G
Guest
This module is causing a "Compile error: User-defined type not defined". It
hilights the first Dim statement - Dim rst As DAO.Recordset. If I take of the
DAO. then I get "Compile error: Method or data memeber not found" and it
highlights rst.Findfirst in my If statement.
Does anyone have any ideas on how to fix this?
Thanks in advance
Private Sub GoToLogEntryLabel_Click()
Dim rst As DAO.Recordset
Dim RecordToFind As String
Dim GUIDofRecord As String
Dim ItemSelectCount As Integer
ItemSelectCount = Me.FilteredLogEntryList.ItemsSelected.Count
If ItemSelectCount > 0 Then
GUIDofRecord = StringFromGUID(Me.FilteredLogEntryList.Column(0))
RecordToFind = "[StringContactID]='" & GUIDofRecord & "'"
Set rst = Forms!contactlogform.RecordsetClone
rst.FindFirst RecordToFind
Forms!contactlogform.Recordset.Bookmark = rst.Bookmark
Set rst = Nothing
DoCmd.Close acForm, "SearchLogForm"
Else
MsgBox "Please select a log entry from the list first.", , "Select
an log entry to find"
End If
End Sub
hilights the first Dim statement - Dim rst As DAO.Recordset. If I take of the
DAO. then I get "Compile error: Method or data memeber not found" and it
highlights rst.Findfirst in my If statement.
Does anyone have any ideas on how to fix this?
Thanks in advance
Private Sub GoToLogEntryLabel_Click()
Dim rst As DAO.Recordset
Dim RecordToFind As String
Dim GUIDofRecord As String
Dim ItemSelectCount As Integer
ItemSelectCount = Me.FilteredLogEntryList.ItemsSelected.Count
If ItemSelectCount > 0 Then
GUIDofRecord = StringFromGUID(Me.FilteredLogEntryList.Column(0))
RecordToFind = "[StringContactID]='" & GUIDofRecord & "'"
Set rst = Forms!contactlogform.RecordsetClone
rst.FindFirst RecordToFind
Forms!contactlogform.Recordset.Bookmark = rst.Bookmark
Set rst = Nothing
DoCmd.Close acForm, "SearchLogForm"
Else
MsgBox "Please select a log entry from the list first.", , "Select
an log entry to find"
End If
End Sub