combo box

N

Nat

I'm trying to create a form with a combo box that from the item chosen in the
combo box it will display only that information for that name.
So if the item chosen is server1
the information will be only about that server.
Is there any sites out there or anyone who can help me out??
 
J

Jeff Boyce

Nat

Generically, I think the following would do what you described:

* create a form bound to a query that could return ALL of the records
* add the combobox to look up the specific "name" (by the way, "Name" is
a reserved word in Access) - include the row ID
* in the combobox's AfterUpdate event, requery the form (i.e.,
Me.Requery)
* now modify the query that returns ALL records and include a selection
criterion for the ID, using something like:
Forms!YourFormName!cboYourCombobox

When you open this form, the combobox is empty. Therefore, the query
returns the record where the row ID is ... null (i.e. none).

When you select a "name" (the ID should be first, bound and 0 width, then
the "name" field) and <Tab> or <Enter> out of the combobox, the AfterUpdate
event tells the form to re-run the query, which now finds an ID and loads
that record.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
K

Klatuu

Is the information about the item all in one record or is it multiple records?
Is the form a single record form, a continuous form, or a datasheet?
 
N

Nat

The information is from multiple records.


Klatuu said:
Is the information about the item all in one record or is it multiple records?
Is the form a single record form, a continuous form, or a datasheet?
 
K

Klatuu

Use the After Update event of the combo to set the form's filter to the value
selected in the combo.
 

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