data from one form to the next

UCLA Lorna

Registered User.
Local time
Today, 14:35
Joined
Mar 8, 2005
Messages
32
I am entering patient information and it requires 2 tables and 2 forms to get all the fields entered. Both tables have a field for patient ID. I enter the patient ID in form 1. When I finish entering data in form 1, I want form 2 to automatically open and the ID number to automatically populate from form 1. Can I do this?
 
can you clarify why you need two tables, and two forms.

why not 1 table only.

if you have too many fields to fit on a form, just add a tabbed control to the form, and split the fields into sensible groups - then tall the fields fit on 1 form.
 
i actually have 4 tables because i have 500+ fields for each patient. i only mentioned 2 tables to make the explanation easier.
 
Why do you need so many fields? it seams to me that you have not normalised your tables. I deal with PID every day and only my SQL universe has anything like that amount of data.

David
 
regardless of how many fields I have, can I auto populate the ID field from one form onto the next?
 
regardless of how many fields I have, can I auto populate the ID field from one form onto the next?

In the event that opens the next form:

Code:
DoCmd.OpenForm "FormNameHere", acNormal, , , , , Me!PatientID

And in the Open Event of the form being opened
Code:
If Me.NewRecord Then
   Me!PatientID = Clng(Me.OpenArgs)
End If

And I know you don't want to hear it but your current structure will likely be a pain in the @$$ to get meaningful data out of. It sounds as if you have it set up to make it easy to ENTER data in, but the unfortunate thing is, that same structure that makes it easy to enter data, will be a hair-pulling nightmare when you really want to get good aggregated data. That is why we stress normalization for good database design. Plus, if you have to add anything in, it usually will require you to modify table(s), queries, forms, and reports where if you design it properly, all you have to do to add, say a medical condition, would be to add a RECORD and no changes are necessary to all of the other items. Just something you should be aware of.
 
regardless of how many fields I have, can I auto populate the ID field from one form onto the next?

How critical is the system you are writing?

Edit: Above poster has given the answer so you can ignore me.
 

Users who are viewing this thread

Back
Top Bottom