Open a Record Form from a Lookup Form

T

Tim G.

I have a little database of contacts. I have created a form that lists the
contacts by name. I also have a form that gives the name and all other
details. I would to be able to scroll through the listbox on the first form
then if I double-click a name, it will open the main form and allow me to
change details then go back to the lookup form. I used to do this in a much
earlier version of Access with macros but it now looks like I need to attach
VBA to the double-click. Trouble is I don't know VBA. Can anyone suggest
how I could do this ?
Many thanks for any pointers.
Tim
 
C

chriske911

I have a little database of contacts. I have created a form that lists the
contacts by name. I also have a form that gives the name and all other
details. I would to be able to scroll through the listbox on the first form
then if I double-click a name, it will open the main form and allow me to
change details then go back to the lookup form. I used to do this in a much
earlier version of Access with macros but it now looks like I need to attach
VBA to the double-click. Trouble is I don't know VBA. Can anyone suggest
how I could do this ?
Many thanks for any pointers.
Tim

in the doubleclick or click event you put in following code
docmd.openform "mainform",,,"[contactID] = '" & [contactIDfield
onyourlookupform] & "'"
then perform a requery of your lookup form or just call the
listbox.requery event

grtz
 
Top