Opening a form from a list box

scary1

Registered User.
Local time
Today, 00:09
Joined
Feb 25, 2003
Messages
20
I have a multi tab form set up with lots of client details in it and I have created another form with a list box control that has just the names and DOB of each client.
I would like to be able to use the list box control to click on the name/dob and it then opens up the full record of that client on the multitab form.
I have tried to use a macro to do this but when I click on the name it just takes me to the first record in the client list!
Please help!
 
Assuming the first column in the listbox contains the primary key of the client field:

Code:
DoCmd.OpenForm "MyForm", , , "[ClientID] = " & CLng(Me.MyListbox.Column(0)),acFormEdit

And change the names to fit.
 
It works!

Thanks v much!!!!!!!!!!!!!!!!!!!!
 

Users who are viewing this thread

Back
Top Bottom