G
Guest
I have a form (frmLogin) with a combo box where users select their User Name
(Authors). I have an OpenForm expression to limit the results of the 2nd form
to a name that matches the name listed in the combo box of the first form. I
tried the follwoing with no luck.
The "Authors" combo box lists user names in "Last, First" name format. I get
an error: "Syntax Error (comma) in query expression 'Lead= last, first'.
"last, first" being the name found in the combo box.
What am I doing wrong here?
Dim stDocName As String
Dim stAuthors As String
stDocName = "Tracking"
stAuthors = Forms![frmLogin]![Authors]
DoCmd.OpenForm stDocName, acNormal, , "Lead =" & stAuthors, acFormEdit
(Authors). I have an OpenForm expression to limit the results of the 2nd form
to a name that matches the name listed in the combo box of the first form. I
tried the follwoing with no luck.
The "Authors" combo box lists user names in "Last, First" name format. I get
an error: "Syntax Error (comma) in query expression 'Lead= last, first'.
"last, first" being the name found in the combo box.
What am I doing wrong here?
Dim stDocName As String
Dim stAuthors As String
stDocName = "Tracking"
stAuthors = Forms![frmLogin]![Authors]
DoCmd.OpenForm stDocName, acNormal, , "Lead =" & stAuthors, acFormEdit