Good evening. I am having problems with my search button. The following is the code attached to the button.
Private Sub Command12_Click()
If (IsNull(cboType)) Or (IsNull(txtCriteria)) Then
MsgBox "Please select search type", vbOKOnly, "please select search type"
ElseIf [cboType] = "FirstName" And [txtCriteria] > "" Then
DoCmd.OpenForm "frmFirstName"
ElseIf [cboType] = "LastName" And [txtCriteria] > "" Then
DoCmd.OpenForm "ConsumersCombined"
ElseIf [cboType] = "ID" And [txtCriteria] > "" Then
DoCmd.OpenForm "ConsumersCombined"
End If
End Sub
I have also uploaded a copy of the database so you can see what that first hand.
Thanks!
Tonya
Private Sub Command12_Click()
If (IsNull(cboType)) Or (IsNull(txtCriteria)) Then
MsgBox "Please select search type", vbOKOnly, "please select search type"
ElseIf [cboType] = "FirstName" And [txtCriteria] > "" Then
DoCmd.OpenForm "frmFirstName"
ElseIf [cboType] = "LastName" And [txtCriteria] > "" Then
DoCmd.OpenForm "ConsumersCombined"
ElseIf [cboType] = "ID" And [txtCriteria] > "" Then
DoCmd.OpenForm "ConsumersCombined"
End If
End Sub
I have also uploaded a copy of the database so you can see what that first hand.
Thanks!
Tonya