Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening record based on listbox selection

Status
Not open for further replies.

MinnKota

Technical User
Nov 19, 2003
166
0
0
US
On my Switchboard form (frmSwitchboard), I have a listbox (lstRecords) that has 5 columns that are filled by a query that basically shows record informations, one of which contains record numbers. When the user selects on of these records, I want to open a different form (frmCAREntry) but I want it to open to the record number that corresponds to what was selected on the Switchboard list box. What is the best way to do this?
 
You can add this to the On Click event of the listbox:

Code:
DoCmd.OpenForm "frmCAREntry", acNormal, , "record_ID = '" & Me.lstRecords & "'"

You will need to change record_ID with the actual field name of the item you want selected.
 
I found this answer in another thread, except I had to remove both '

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top