OpenForm

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!
 
S

strive4peace

Hi Rudi,

When frmUsers opens, look in the lower left corner at the navigation
area to see how many records are in the filtered recordset. Chances are
that your form is set to Single instead of Conitnuous, so only one of
the records shows at one time -- but if you go through the records, you
will see more (try PageUp and PageDown if the navigation buttons don't show)

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
S

strive4peace

you're welcome, Rudi ... do you live in Houston?

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
S

strive4peace

thanks, Rudi -- I thought it was a long shot, but your name is not
common here and I knew "one of you" ;)

A small country you probably never heard of..well now I have!

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top