Thanks for your help again. I will benefit from your assistance.
:
Hi, shep.
Need: How can I get the Patient name to fill in when I select
ChartNumber?
If you have primary keys on these tables, then I would recommend an
autolookup query to automatically fill in any and all information
about
the
patient (like the phone number, too) on this appointment form which
doesn't
need any coding. There's a step-by-step tutorial on how to
automatically
fill in the information on a form on this Web page:
http://www.Access.QBuilt.com/html/forms.html#AutoCompleteForm
Substitute your appointments table for the tblInvoices table in the
example
and substitute your patients table for the tblContractors table in the
example. (I would use the primary key of the patient table instead of
the
ChartNumber -- if that isn't your primary key -- to be on the safe
side,
but
since it's unique you may get away with using ChartNumber.) When
creating
the query, make sure that the ChartNumber (or patient's table primary
key) is
added to the query design grid from your appointments table, not your
patients table.
When complete, all you have to do when creating a new appointment is
to
select the patient's name (or the ChartNumber, depending upon which
value(s)
you want to show) in the combo box and the patient's information will
automatically populate all of the patient fields on the form. No code
necessary.
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address so that a
message
will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the
question
"Did this post answer your question?" at the bottom of the message,
which
adds your question and the answers to the database of answers.
Remember
that
questions answered the quickest are often from those who have a
history
of
rewarding the contributors who have taken the time to answer questions
correctly.
:
I am running WIN XP Pro and Office 2003 Pro
I have I have a table with patients info. I created a query to
create
Name
such as Joe J. Doe from the table's LastName, FirstName, MI and
included
ChartNumber from the table in the query. ChartNumber is unique to
each
patient.
I have a table to management appointments. It includes ChartNumber
and
Name
and they are lookups from the query. I created a form to enter
appointment
data into the appointment table.
Problem: On the form, I have to pick ChartNumber and then pick Name
from
the lookup list.
Need: How can I get the Patient name to fill in when I select
ChartNumber?
Thanks