Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

save record, open form and auto-populate??

Status
Not open for further replies.

leealkureishi

Technical User
Jun 18, 2004
5
GB
Dear all,

I'm new to databases, and hope that you can help me.

I'm creating a database for a medical research study, looking at surgical complications. It's the first database I've worked with properly, let alone designed from the ground up. It's also getting quite complicated, so I could do with a bit of help :p

I have 3 tables:
1. Patient details - contains patient demographics
2. Primary operation - contains details of the patient's first operation. There may be two instances for each patient (left and right side)
3. Re-operation - contains details of a subsequent operation (e.g. due to a complication arising from the first operation).
There may be multiple secondary operations for a given patient, each of which relate specifically to
one side (left or right). The most operations in my population is 11.

I've created a one-to-many relationship between table 1 and table 2, and a one-to many relationship between table 2 and table 3. I think this is the right way to go about this, but if anyone wants to correct me I'd love to hear suggestions.

My question is this:
I've created 3 basic forms to correspond to the tables, but at the moment there is no logical progression from one form to the next. Since each patient (record) will require at least one of all 3 tables, I'd like to set it up so that when the user finishes entering the data into form1 (patient details table), he/she can press a button which will close that form and open the next one (form2 - primary procedure) for that patient. In addition, it would be beneficial to pre-populate the newly opened form with some of the data already entered in the previous form e.g. the patient's medical record number (MRN) and/or name.

A friend of mine suggested that what I need to ask about is how to pass arguments from one form to another in order to pre-populate the next form, but wasn't sure how to go about it. Any suggestions would be greatly appreciated.

Oh aye, and if anyone needs questions answered on the subject of building cages for chinchillas, I'd be happy to reciprocate :p

Thanks in advance,

Lee

 
Have you looked into putting subforms on your main form? Each subform could be associated with a database. Another thought would be to create a single forn that has all the fields from all the databases. There would then be no need for other forms and a single form would be associated with a patient. Of course, this last method would only work if there was just one record in each table for a given patient.

There's always a better way. The fun is trying to find it!
 
tviman,

thanks for the quick answer!

I did think about putting it all in one form, but that form would be HUGE (each of the 3 forms atm requires scrolling).

In addition (and more importantly), each patient has a variable number of secondary operations (from 1-10), so a single form would have to have space (and fields) for at least 10 secondary procedures. That would be pretty ugly, and mostly redundant, hence I created the forms separately. That way, I can have one "details" form, one "primary" form, and multiple instances of the "secondary" form.

As i said, i'm new at this and learning as i go, so if there's a better way to do it, I'm all for it!

Thanks again, and I look forward to your further suggestions!

Lee
 
oops, just re-read your post, and saw the bit about sub-forms. I don't really know anything about them, can you tell me about them, and would they get round my problem?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top