Reopen an existing recored through main form

C

calltecman

I need some help. I have a main (tabbed) form for Customer Contact
information. The Contact ID is the unique record, and is created by
coder...not autonumber. I want to create a lookup box that wil allow me to
select an existing record, place the record in the ContactID text box, be
able to depress enter and have the form populate the existing data. Can
anyone help me with this? I would be very greatful!!!
 
A

Al Campagna

caltec,
On my website I have an A97 and A2003 sample file called Combo Populates Multiple
Fields.
User selects a unique key value from the combo, and mutliple fields "display" relevant
information associated with that ID.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
J

Jeff Boyce

That sounds like more work than you need to do...

If you include an unbound combobox in the header of your form, you can use
that combobox to list all the records (ContactID, ContactName).

You can set the Control Source of the form to a query that refers to that
combobox for a ContactID as a parameter/selection criterion, something like:
Forms!YourFormName!cboYourComboBoxName

You can add code to the combobox's AfterUpdate event that requeries the
form, like:
Me.Requery

With this approach, when you first open the form, nothing is in the
combobox, so no record is shown in the form. After you select a record
(based on the ContactName ... a lot easier than trying to remember IDs) in
the combobox, the form "loads" that Contact's information.

Is that what you were looking to do?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
C

calltecman

Thanks Jeff....this is exactly what I want to do. I will let you know the
outcome.

Thanks!
 
Top