R
Rudi
Hello,
I need some help with my OpenForm line.
I have a form called frmNamePick where the user pics a last name from
the cboLastName and than clicks on a button to open the form frmUsers.
I'm using this piece of code in the "On click" event of the button to
make the frmUsers open to a specific record of a user with the same
last name as the selected:
stDocName = "frmUsers"
strTest = Me.cboLastName.Value
stLinkCriteria = "LastName=" & "'" & strTest & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
The code works fine and the form frmUsers opens to the right record.
The problem occures when there is more than one user with the same last
name. The way I have things setup right now the form displays only the
one, first record. I want it to display all of the records with the
same last name.
Any help on making this work would be greatly appreciated!
I need some help with my OpenForm line.
I have a form called frmNamePick where the user pics a last name from
the cboLastName and than clicks on a button to open the form frmUsers.
I'm using this piece of code in the "On click" event of the button to
make the frmUsers open to a specific record of a user with the same
last name as the selected:
stDocName = "frmUsers"
strTest = Me.cboLastName.Value
stLinkCriteria = "LastName=" & "'" & strTest & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
The code works fine and the form frmUsers opens to the right record.
The problem occures when there is more than one user with the same last
name. The way I have things setup right now the form displays only the
one, first record. I want it to display all of the records with the
same last name.
Any help on making this work would be greatly appreciated!