Primary Keys

J

jdickerson

All,

Here is my dilemma. I have a table listing item#'s and item descriptions.
The item# is the primary key. I have a form that captures item# description
and other information. I would like the description field to auto fill once
the item# is entered. I can not use a combo box as there will be nearly 1000
items. Any help or suggestions would be appreciated.

Jamie
 
A

Allen Browne

Create a query using both your Items table, and also this table where items
are used. Select * from this table, and the [Description] field from the
Items table.

Use that query as the source for your form. Place the Description text box
on the form, and set its Locked property to Yes so the user cannot change
it. Now when you enter a valid item number, the description will show
automatically.

(You could use a combo with 1000 items if you wanted to.)
 
M

M Skabialka

I have a database with a multi column combo box with over 100,000 items.
The users don't search for items in the list - they just type the number in.
When they hit enter the after update event looks at the other combo columns
and drops the info into the appropriate fields on the form. My example has
4 columns in the combo (0 - 3), though the users only see two (the others
have width of 0)

Private Sub DocNumberSelect_AfterUpdate()
OfficeLocation = DocNumberSelect.Column(1)
CreateDate = DocNumberSelect.Column(2)
LastEditBy = DocNumberSelect.Column(3)
End Sub

Also using a combo can allow you to restrict users to only items listed
there so thay can't enter incorrect information.
Mich
 

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

Similar Threads

Control Will Not Update 6
Error 424 in Auto Fill 3
form field 1
Dlookup, one more time 2
Combo Box Selections 3
Using subforms to add add data to related tables 1
Combo Box control with keyboard keys 4
Combo Box 2

Top