A
alex
using access '03...
I’m trying to open a subform (filtered) related to a table called
tblIO2…
I’m using the following code to no avail (it opens the form filtered,
but nothing shows):
Dim stDocName As String
Dim strFilter As String
Dim strSQL As String
strSQL = "select tblIO.IDENTIFIER from tblIO where tblIO.UserID =
[Forms]![frmLogin]![LoginName]"
strFilter = "IDENTIFIER = 'strSQL'"
stDocName = "sfrmIO"
DoCmd.OpenForm stDocName, acFormDS, , strFilter
The SQL statement works (I’ve tested it). It appears that the
strFilter does not recognize strSQL!
If I remove strSQL from ["IDENTIFIER = 'strSQL'"] and insert an actual
result, the filter works fine.
Thanks for lookin'
I’m trying to open a subform (filtered) related to a table called
tblIO2…
I’m using the following code to no avail (it opens the form filtered,
but nothing shows):
Dim stDocName As String
Dim strFilter As String
Dim strSQL As String
strSQL = "select tblIO.IDENTIFIER from tblIO where tblIO.UserID =
[Forms]![frmLogin]![LoginName]"
strFilter = "IDENTIFIER = 'strSQL'"
stDocName = "sfrmIO"
DoCmd.OpenForm stDocName, acFormDS, , strFilter
The SQL statement works (I’ve tested it). It appears that the
strFilter does not recognize strSQL!
If I remove strSQL from ["IDENTIFIER = 'strSQL'"] and insert an actual
result, the filter works fine.
Thanks for lookin'