Combo Box Populating Text Fields Which Can Then Be Edited

G

Guest

Hello All

Pretty New To Access - Apologies if this is striaght forward!

I have a form which i would like the user to be able to select a company
from a combo box. once they have made the selection i would like the
companies details to be populated in the text boxes below, from where the
user can edit the values and update the record.

The company table has a primary field c_id and they can search within the
combo box using the c_name.

Thanks for looking - any help would be great

Regards

Drodway
 
B

BruceM

If I understand correctly, make a form based on the company table. Open the
toolbox, be sure the magic wand icon is highlighted, click the combo box,
and draw a combo box on the form (the header is a good place). At the
dialog that shows up, select the option to find a record based on the combo
box selection.
 
G

Guest

If I were to create an unbound combo box called "CompSrch" I would put the
following in its "after update" event (where "CompName" is the company I am
searching for). I think the quotation marks may be incorrect but try it
anyway.

Set rstClone = Me.RecordsetClone

rstClone.FindFirst "[CompName] = " & Me.CompSrch & ""

Me.Bookmark = rstClone.Bookmark

Set rstClone = Nothing

This code will take you to the appropriate record.
 

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