Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto fill ??

Status
Not open for further replies.

ddmtn546

Technical User
Dec 20, 2000
38
US
I am relatively new to Access and am struggling with a problem.
I have a "Customers" table and a "Customers" form. The 1st fiels on the form is the customer's last name. I want to be able to begin typing the existing customers last name and have the rest of the form automatically "fill-in". I am obviously missing something simple. Thanks in advance, ddmtn546.
 
A combo box would work for you in that situation. In the form design view click on the combo box. Make sure that the controls wizard (it looks like a magic wand in the toolbox section) is on so the wizard will ask you if you want to look up the values in your customers table. It should walk you thru it all.
 
Include all of this in the detail section!! I would first create a combo box where the user can type or click on a last name. I would then write an "After Update" code in the event procedure in the Agent Last Name field.

For the following example, I will assume that the combo box is called Combo118 and that the name field is called
Name.
The code would be something like this:

Sub [FieldName]_AfterUpdate()
Me.RecordsetClone.FindFirst "[Name] = " & Chr(34) & Me![Combo118] & Chr(34)
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub


**This will find the record that matches the control (combo box) and fill in the fields for you.

Hope this helps!

--Angela
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top