C
Curt
I have two tables that are related by more than one
Primary key from one table to another.
for example
tblCustomer
firstname PK
lastname PK
address PK
phone
etc
tblEmployee
EmployeeID PK
firstlastaddress FK
tblVisit
ID PK
firstlastaddress FK
EmployeeID FK
ReasonforVisit FK
etc
etc
TblCustomer and tblVisit are used for initial sign-in for
each customer and visit. When someone signs in they can
choose the reason for their visit. If they are in the
database already then it adds a visit for the employees to
see and take care of. If they are not in the database
then it adds them to tblCustomer and TblEmployee.
Employees can also be customers which is assigns them as
employees through another form. Once the employee takse
care of them then it shouold assign their ID along with
time, etc in tblVisit for that particular customer.
The problem I have is when when I try to complete a task
on a form and assign the EmployeeID to tblVisit against a
particular customer. For some reason it won't allow me.
Can someone provide a suggestion on how to create a query
that I can use as a recordsource for the form.
I know I should use a CustomerID in tblCustomer, which
would make everything easier. However, I am too far into
the database to start over and it appears to work every
elese so far.
If I have to start over how would I make the changes on
the sign-in form for it to check the info to see if the
person is in the db already?
Thanks for any positive input
Primary key from one table to another.
for example
tblCustomer
firstname PK
lastname PK
address PK
phone
etc
tblEmployee
EmployeeID PK
firstlastaddress FK
tblVisit
ID PK
firstlastaddress FK
EmployeeID FK
ReasonforVisit FK
etc
etc
TblCustomer and tblVisit are used for initial sign-in for
each customer and visit. When someone signs in they can
choose the reason for their visit. If they are in the
database already then it adds a visit for the employees to
see and take care of. If they are not in the database
then it adds them to tblCustomer and TblEmployee.
Employees can also be customers which is assigns them as
employees through another form. Once the employee takse
care of them then it shouold assign their ID along with
time, etc in tblVisit for that particular customer.
The problem I have is when when I try to complete a task
on a form and assign the EmployeeID to tblVisit against a
particular customer. For some reason it won't allow me.
Can someone provide a suggestion on how to create a query
that I can use as a recordsource for the form.
I know I should use a CustomerID in tblCustomer, which
would make everything easier. However, I am too far into
the database to start over and it appears to work every
elese so far.
If I have to start over how would I make the changes on
the sign-in form for it to check the info to see if the
person is in the db already?
Thanks for any positive input