S
Steven L via AccessMonster.com
I can't seem to use any string methods. Every time I try I get an "Invalid
qualifier" error.
Here's my code below. I get the error at the line that reads "If
recordFilepath.StartsWith(fileHead) Then" and the debugger points to
'recordFilepath'.
code:
====================================================
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("records")
Dim recordFilepath As String
rst.MoveFirst
For i = 1 To rst.RecordCount
recordFilepath = rst.Fields("filepath").value
If recordFilepath.StartsWith(fileHead) Then
'check what type of report it is
If recordFilepath.EndsWith("STATE-FRIENDS.pdf") Then
Me![family statement].HyperlinkAddress = "
www.blahblahblah.com"
End If
End If
rst.MoveNext
Next i
====================================================
It almost seems like the String object isn't within my references. Is that
possible? If so, what do I need to do to remedy that?
Any help will be much appreciated.
Cheers,
Steve
qualifier" error.
Here's my code below. I get the error at the line that reads "If
recordFilepath.StartsWith(fileHead) Then" and the debugger points to
'recordFilepath'.
code:
====================================================
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("records")
Dim recordFilepath As String
rst.MoveFirst
For i = 1 To rst.RecordCount
recordFilepath = rst.Fields("filepath").value
If recordFilepath.StartsWith(fileHead) Then
'check what type of report it is
If recordFilepath.EndsWith("STATE-FRIENDS.pdf") Then
Me![family statement].HyperlinkAddress = "
www.blahblahblah.com"
End If
End If
rst.MoveNext
Next i
====================================================
It almost seems like the String object isn't within my references. Is that
possible? If so, what do I need to do to remedy that?
Any help will be much appreciated.
Cheers,
Steve