Few questions regarding Queries, Forms, and Relations.

  • Thread starter Thread starter FirebirdGM
  • Start date Start date
F

FirebirdGM

Alright, I have numerous questions regarding the creation of a
relational database system with Microsoft Access.

1) Lets say I have the following fields in a table named Customers:

FirstName
LastName
Address
CreditCard

How would I create a form/query which had a text box, where I could
enter a name, and it would search by FirstName field? Obviously, I
would need a query to do a 'WHERE" statement, but I don't know how to
set the WHERE Clause to a text box on the form. :|

2) This comes moreso into play with the relationalness.

Lets say I have two tables:

LOCKERS
LockerID
Renter

CUSTOMERS
Name
LockerID
Renter


Is there a way which I can link the two 'LockerID' and 'Renter'
together, so that one would read the data from the other one, and
update accordingly?

Thanks.
 
Hi,
1) Not really sure why you would want to search a form
by first name, but you must have a reason. Would you want
to be searching your table to look for that first name?
If so, once you have created a form (you can use form
wizard), you can change the first name text box to a combo
box or list box (wizards are also available). This will
build the lookups for you. You'll get a list to choose
from.
2) You don't need to have renter in both tables. The
customer table should contain all data relevant to
customers. The locker table should contain data relevant
to the locker. Also, I would think you need date(s) in
the customers table. Customers usually are associated to
lockers for some limited amount of time. If you had
locker 1 for 2002 and I had it for 2003, your table
structure would have no way of telling you this.
Hope this helps.
 
Back
Top