Creating a continious sub form

J

John

I have created three sub forms in a main form all filling different tables.
They all have the same primary key of medical record number. First question
how can I have the medical record number filled in for all fileds labeled
medical record number after only filling it in on one field?
Second question, I was told I could make the sub forms continious so I can
always see the data that was input previously. I can find plenty of help in
placing sub forms but no help in what continious forms do for me as well as
how to take an existing form and make it continious.
Thanks
 
A

Al Campagna

John,
Not sure what you mean by...
how can I have the medical record number filled in for all fileds labeled
medical record number after only filling it in on one field?

I think you may not realize the power of a relational database, and
the concept of table relationships.

Let me use an example such as ONE Patient, to MANY office visits...
Given a parent table, like tblPatient, and a child table, like
tblVisits, related
to each other by PatientID...

Your main form, frmPatient, (a single form) will be based on
tblPatients.
Your subform, frmVisits, on that form (a continous form) will be based
on tblVisits.
The subform will be related to the main form through the subform's
properties of...
Link Child Field = PatientID
and
Link Parent Field = PatientID
When viewing John Smith's main form, and new visits added to the
frmVisits subform will be forced to have the same PatientID "automagically"
because of the relationship between the tables. You don't have to worry
about that ascpect.

Ex. Single Main (The ONE)
Name Address City State
John Smith 67 Main St Boston MA
-----------
Ex. Continuous Subform (The MANY)
Date From To Desc
1/1/09 10:00am 11:00am Flu Shot
1/10/09 1:00pm 1:30pm Checkup
2/7/09 11:00am 11:45am Blood Test
etc... etc...

**A single form can be changed to a continous form by setting the form's
Default View property from Single Form to Continuous Form.
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
J

John W. Vinson

I have created three sub forms in a main form all filling different tables.
They all have the same primary key of medical record number. First question
how can I have the medical record number filled in for all fileds labeled
medical record number after only filling it in on one field?

No, you cannot; not if it is the Primary Key of the table. A primary key is,
by definition, unique within that table.

The medical record number must be a NON-unique foreign key field in the
related table. Each table should have its own primary key (distinct from the
medical record number).

You can use the Medical Record Number as the master and child link field
property of each subform, and it will be automatically filled in when you
create new records.
Second question, I was told I could make the sub forms continious so I can
always see the data that was input previously. I can find plenty of help in
placing sub forms but no help in what continious forms do for me as well as
how to take an existing form and make it continious.
Thanks

A continuous form lets you see multiple records at the same moment on screen.
You can make an existing Single form into a Continuous one by opening it in
design view and changing the "Default View" property from "Single" to
"Continuous". To be most useful, you should move all the controls up to the
top of the detail section, and snug the bottom of the detail section up to the
bottom of the controls, so the repeated block of controls will fit on the
screen.
 

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