I keep getting the following compile error:
"User defined type not defined"
I have looked through my code several times and can't see anything.
Here is my code. Any suggestions?
Private Sub cmdSearch_Click()
Dim strSQL As String, strOrder As String, strWhere As String
Dim dbNm As Database
Dim qryDef As QueryDef
Set dbNm = CurrentDb()
strSQL = "SELECT tblParticipants.ID, tblParticipants.Name " & _
"FROM tblParticipants"
strWhere = "WHERE"
strOrder = "ORDER BY tblParticipants.Name;"
If Not IsNull(Me.txtTitle) Then
strWhere = strWhere & " (tblParticipants.Name) Like '*" & Me.txtName & "*' AND"
End If
strWhere = Mid(strWhere, 1, Len(strWhere) - 5)
Me.lstName.RowSource = strSQL & " " & strWhere & "" & strOrder
lstName.SetFocus
End Sub
"User defined type not defined"
I have looked through my code several times and can't see anything.
Here is my code. Any suggestions?
Private Sub cmdSearch_Click()
Dim strSQL As String, strOrder As String, strWhere As String
Dim dbNm As Database
Dim qryDef As QueryDef
Set dbNm = CurrentDb()
strSQL = "SELECT tblParticipants.ID, tblParticipants.Name " & _
"FROM tblParticipants"
strWhere = "WHERE"
strOrder = "ORDER BY tblParticipants.Name;"
If Not IsNull(Me.txtTitle) Then
strWhere = strWhere & " (tblParticipants.Name) Like '*" & Me.txtName & "*' AND"
End If
strWhere = Mid(strWhere, 1, Len(strWhere) - 5)
Me.lstName.RowSource = strSQL & " " & strWhere & "" & strOrder
lstName.SetFocus
End Sub