Creating database and wish to automate

T

Theresa

I have been working on a database (for a really long time) and getting
nowhere. I am stuck on how to get data in a field from one table into
another. Specifically- I have a table listing patient demographics in
separate fields (MR#(Key), Last Name, Address...). The next step is to go to
a table (Relationship is the MR# field) that l list each hospital episode
data (admission date, diagnosis, physician...). There can be many hospital
records for each patient. I am currently stuck at the point where I would
like to enter the MR# on the hospitalization table and the last name and
first name from the demographics table automatically fills in when the MR#
match. As soon as I get this down, I am sure I will come up with another
issue, but I have to start somewhere. Thanks, Theresa
 
T

Theresa

Thank you so much. I am looking for a way that when you go to the Hospital
admission form/table and type in a mr # you can verify the patients name and
make sure the patient has a record in the demographics table. any suggestions
on ow to accomplish that. I know this is pretty basic but I appreciate your
time. Maybe when going into the Hospital adimssin form, the first and last
name are placed on the form somehow and not stored as additional data. Also,
I would like to look patient up by last name to complet the hospitaization
form. I maybe approaching this all wrong.

Thank you,
Theresa
 
B

Bob Waggoner

Theresa, because access is a relational database, you can create forms and
reports from more than one table. When you access the data, do you want to
access it on a form or report?The way you link those tables (by your key MR#)
allows you to draw information from both tables. You may simply want to
create a subform or subreport that uses the data from both tables.

Table 1 (key MR#)
Table 2 (foreign key MR#)
 
J

John W. Vinson

Thank you so much. I am looking for a way that when you go to the Hospital
admission form/table and type in a mr # you can verify the patients name and
make sure the patient has a record in the demographics table. any suggestions
on ow to accomplish that. I know this is pretty basic but I appreciate your
time. Maybe when going into the Hospital adimssin form, the first and last
name are placed on the form somehow and not stored as additional data. Also,
I would like to look patient up by last name to complet the hospitaization
form. I maybe approaching this all wrong.

Well, you're not taking full advantage of the tools that Access provides!

As Roger says, you should NOT store the name or other demographics redundantly
in any second table. Relational databases use the "Grandmother's Pantry
Principle": "A place - ONE place! - for everything, everything in its place".

I would use a Form to enter the data. You should almost certainly NOT make the
user type in a MR# (and then slap their hand if they make a mistake); instead
they should *select* the MR# from a Combo Box. You could also (or instead)
have a combo box displaying the last (and first, and MR#) name, but storing
the MR# in your table. With the default autocomplete feature turned on, they
can start to type the number or name and it will jump to the first value
starting with what they type. The Combo Box can also display the patient's
name; or, you can put textboxes on the form with control sources like

=comboboxname.Column(n)

where n is the zero-based index of the field you want to display from the
combo's row source query.
 

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