combo with auto fill Access 2000

U

uuhhgg

I would like to have a form with a combo box where I can select a part number
and after I select that part number to have the rest of the form fill in.
 
J

Jeff Boyce

Create a form with the fields you want to display. Create a query that
returns all records for the form.

On the form, add an unbound combobox that lists part numbers. The Header is
a good location.

Modify the query to look at the form's combobox as a selection criterion for
the part number field. This will look something like:

Forms!YourFormName!cboYourComboboxName

In the combobox's AfterUpdate event, add something like:

Me.Requery

(this will cause the form to recheck its source, the query, which uses the
combobox selection to return a single record)

It that what you are trying to do?


Regards



Jeff Boyce

Microsoft Office/Access MVP
 
J

jb

One way you could do this would be to have some/all of your additional
fields in your combo box row source (like PartNo, Desc, Cost, Markup, Sell
Price, etc.) and in the AfterUpdate event of the combo box, you could then
fill your other fields in based on the contents of the columns of the
selected part in the combo box.

me.description = Me.cboPartNo.Column(2)
me.cost = Me.cboPartNo.Column(3)
....
hth

John
 
U

uuhhgg

I'm not that good with code. where would I put it? It looks like it will do
what I want it to but I'm just stupid when it comes to code. I'm more of the
point and click type
 
J

Jeff Boyce

The newsgroups here provide great support for answering specific questions.

Yours seems more like a general tutoring session or a class in designing
forms and using Events. Since most of us here are volunteering our time,
you may not find many who can afford to volunteer to do this training.

You might want to see if you can locate a local or on-line class covering
these topics.

If you have little-to-no experience working with Event procedures, this
might be the opportunity to gain some.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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