NauticalGent
Ignore List Poster Boy
- Local time
- Today, 03:02
- Joined
- Apr 27, 2015
- Messages
- 6,341
Hello folks,
I am using an Option Group to open and filter another form. I am trying to use BuildCriteria to accomplish this, but I am not having luck. Here is my code:
Private Sub Frame0_AfterUpdate()
Dim strCriteria as String
strCriteria = BuildCriteria("[FLT_ID]", dbText, "5")
Select Case
Case 1
If DCount("*","qryMyQuery") > 0 Then
DoCmd.OpenForm "frmMyForm",,strCriteria
Me.Filter = strCriteria
Me.Filter = True
Else
MsgBox "No Records to Display":
End If
Case 2....
I get a clean Compile and all that, and the form opens with do errors. However no records are getting filtered.
Can anyone tell me what it is I am doing wrong?
TIA
I am using an Option Group to open and filter another form. I am trying to use BuildCriteria to accomplish this, but I am not having luck. Here is my code:
Private Sub Frame0_AfterUpdate()
Dim strCriteria as String
strCriteria = BuildCriteria("[FLT_ID]", dbText, "5")
Select Case
Case 1
If DCount("*","qryMyQuery") > 0 Then
DoCmd.OpenForm "frmMyForm",,strCriteria
Me.Filter = strCriteria
Me.Filter = True
Else
MsgBox "No Records to Display":
End If
Case 2....
I get a clean Compile and all that, and the form opens with do errors. However no records are getting filtered.
Can anyone tell me what it is I am doing wrong?
TIA