bklyn,
Have you tried OpenArgs?
If
the initial form is [INITIAL FORM] and
[INITIAL FORM] contains a text box named HOSPITALID and
a value is entered for HOSPITALID in [INITIAL FORM] and
clicking a command button on [INITIAL FORM] opens a second form named PRESCREEN and
PRESCREEN also contains a textbox called HOSPITALID and
you want the new HOSPITALID to have the same value as the one on [INITIAL FORM]
then...you'll have some code behind that command button to open PRESCREEN. Try this:
(presumes the command button is cmdOpenPrescreen)
Code:
Private Sub cmdOpenPrescreen_Click()
DoCmd.OpenForm "PRESCREEN",,,,,,HOSPITALID
End Sub
Then in the On Open event in PRESCREEN, you'll have this:
Code:
Private Sub Form_Open(Cancel As Integer)
Me!HOSPITALID = OpenArgs
End Sub
You'll get an error if [INITIAL FORM]!HOSPITALID contains no value, so you'll want to stick in some code to check it (If Len(HOSPITALID & "") = 0 Then ...), but that's about the only gotcha. Every subsequent form must be opened setting OpenArgs equal to the ID and every On Open event would have to have the value of its ID set to OpenArgs.
Regarding your previous note, it doesn't much matter what the wizard suggests, you have to refer to the control by using the correct name. HOSPITAL_ID is NOT the same as HOSPITALID. If the control is actually named HOSPITALID, referring to it as HOSPITAL_ID will cause you grief.
Suggestions: (you didn't ask for this but you get it free of charge)
You might want to consider a different naming convention. That initial form should probably be called frmInitialForm (no need for brackets that way)(In general it's a good idea to avoid spaces in the name of ANY object). HOSPITALID should probably be called txtHospitalID since it's a text box. Unfortunately these suggestions may come a little late if you're trying to repair someone else's damage.
Dave