A Newbie question

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

I have a table called patients, and another called doctors.

In the patient's table I have a Lookup so that I can pick a doctor from
the doctor's table.

What I want to do is this:

On my patent's form, when I select the Doctor from the pulldown, I need
to have other info from the doctor's table appear, such as phone number,
and pager number etc. Can someone tell me how to do this?

Thanks,
Jason
 
Jason said:
I have a table called patients, and another called doctors.

In the patient's table I have a Lookup so that I can pick a doctor from
the doctor's table.

What I want to do is this:

On my patent's form, when I select the Doctor from the pulldown, I need
to have other info from the doctor's table appear, such as phone number,
and pager number etc. Can someone tell me how to do this?

You need to create a query with the required information and base your form
on that.
As a newbie you should be aware that the help file in Access is in general
excellent and that the Northwind database has many examples of what you are
trying to do.

Contrary to popular opinion, professionals read manuals. Some of us even do
it for fun.
 
The name of this feature is AutoLookup. It's kind of hard to find as it is
not in the help index, but if you search on it you should see a topic on how
to set it up.

The Orders form in Northwind provides a good example.
The form is used to managed Orders, but is based on a query that joins in
the customer info.

In your case, it sounds like you would manage patients, but base it on a
form that also joins in Doctor info.
You should first create a one-to-many relationship
on the Patients DrID foreign key( the one side ) to the Doctor's Primary
Key( the many side).

You won't be able to change anything in the Doctors table( which is a good
thing here. Use another form to manage Doctor stuff ).
But you CAN change the DrID Foreign Key in the patient table. This field
should be managed by a combo box that restricts the selection to a valid
Doctor. Once another doctor is selected, the other info for the new doctor
should get pulled in for you.
 
Back
Top