A
alex
Open Form filtered
Using Access ’03…
I am attempting to open a form (from another) filtered.
I have this code:
Dim strDocName As String
strDocName = "frm1”
Dim strCriteria As String
strCriteria = "[Key] = " & Q & Replace(Me.Key, Q, QQ) & Q
DoCmd.OpenForm strDocName, , , strCriteria
DoCmd.Close acForm, me.name
Debug.Print (strCriteria)
I cannot get frm1 to open with the filtered record…it (the form)
displays all records.
The code in the immediate window looks right: [Key] = “5042”
Do I need to adjust the properties of frm1? It’s a form for viewing
only, no data entry or edits.
Thanks,
alex
Using Access ’03…
I am attempting to open a form (from another) filtered.
I have this code:
Dim strDocName As String
strDocName = "frm1”
Dim strCriteria As String
strCriteria = "[Key] = " & Q & Replace(Me.Key, Q, QQ) & Q
DoCmd.OpenForm strDocName, , , strCriteria
DoCmd.Close acForm, me.name
Debug.Print (strCriteria)
I cannot get frm1 to open with the filtered record…it (the form)
displays all records.
The code in the immediate window looks right: [Key] = “5042”
Do I need to adjust the properties of frm1? It’s a form for viewing
only, no data entry or edits.
Thanks,
alex