Developing a Database

A

Anthony Brown

Hello All,

I want to develop a simple database where I can Input
records of customers, and also recall those records using
a form.

Ex. I type the cust id in a form and the remaining
information is auto populated.


Please Help
 
P

PC Datasheet

Start with a Customer table:

TblCustomer
CustomerID
FirstName
LastName
Address
City
State
ZipCode
etc

1. Create a query based on TblCustomer and set the sort on LastName to
ascending.
2. Use the form wizard to create your data entry form and base the form on the
query in 1.
3. Somewhere on your form add an unbound combobox.
a) Put the following expression in the rowsource property of the
combobox:
Select CustomerID, "LastName" & ", " & "Firstname" As Customer From
TblCustomer OrderBy Customer;
b) Set the BoundColumn to 1, Column Count to 2 and Column Width to 0;2
c) Put the following code in the AfterUpdate event of the combobox:

Dim Rst As DAO.Recordset
Rst.FindFirst "[CustomerID] = " & Me!NameOfYourCombobox
Me.Bookmark = Rst.Bookmark
Rst.Close
 

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