Select individual record in Form from an Combo Box

N

Neal0o

I have a training record form for each individual in my company. I would
like to be able to select an individual by selecting their name from the
combo box. Could someone please assist me? I've designed the database but
i'm having trouble figuring this out. I'm new with using access 2000. Thank
you all and have a nice day!

Neal
 
S

Steve Schapel

Neal,

Here's one approach... Put an unbound combobox in the Form Header
section of the form, which gives a list of "individuals". I assume you
would have an IndividualID or some such identifying field in your
Individuals table, so you can set up the combobox so this ID field is
the 'Bound Column', but can be hidden so it is the Individual's name
that is shown. Let's say you name this combobox IndivSel.

Also, you will need to make sure there is a control on the Detail
section of the form bound to the ID field. (If, as is often the case,
you do not want this ID field to be seen on the form, you can fine-tune
this procedure by making the control very small, setting the ForeColor
the same as the form's BackColor, and setting the control's Tab Stop
property to No).

Then, on the After Update event of the combobox, put code like this...

Me.IndividualID.SetFocus
DoCmd.FindRecord Me.IndivSel
Me.IndivSel = Null
Me.SomeOtherControl.SetFocus
 

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