Exodus
Registered User.
- Local time
- Today, 13:46
- Joined
- Dec 4, 2003
- Messages
- 317
I'm trying to requry a sub form based either or both text boxes. I need help with the code. I'm trying to rewrite something from a sample but can't seem to get it to use the criteria. It does requery though.
Can some one steer me in the right direction
Code:
Private Sub cmdSearch_Click()
Dim sCriteria As String
sCriteria = "WHERE 1=1 "
If Me![Search] <> "" Then
sCriteria = sCriteria & " AND MedicalRecordsUpdating.SerialNumber """ & Search & """"
End If
If Me![SearchEvent] <> "" Then
sCriteria = sCriteria & " AND MedicalRecordsUpdating.Event """ & SearchEvent & """"
End If
Forms![RecordManagment]![FrmMedicalRecordsUpdating].Form.Requery
End Sub