G
Guest
I'm trying to do something very simple and have been having loads of trouble
with it. I have two forms, between which I would love to pass a variable.
So far my efforts have been centered around using a public variable. The
code I use is this:
Mod_Global_Variables (Standard Module):
Public Social_Security_Number As String
FRM_Patient_Basic (Main Form)
Private Sub TXT_Social_Security_Number_Exit(Cancel As Integer)
Social_Security_Number = Trim(TXT_Social_Security_Number.Value)
End Sub
Now I know that the variable is being assigned because I am running a check
before I open the second form and it is returning the value.
Secondary Form (FRM_Patient_Address):
Private Sub Form_Load()
Me.Modal = True
Me.DataEntry = True
Me.NavigationButtons = False
TXT_Social_Security_Number.Value = Social_Security_Number
TXT_Social_Security_Number.SetFocus
TXT_Social_Security_Number.Text = Social_Security_Number
End Sub
This does not seem to work and the variable never seems to get passed which
a quick MSGBOX check on Social_Security_Number makes obvious.
Any suggestions??
THanks a Lot!
Kris
with it. I have two forms, between which I would love to pass a variable.
So far my efforts have been centered around using a public variable. The
code I use is this:
Mod_Global_Variables (Standard Module):
Public Social_Security_Number As String
FRM_Patient_Basic (Main Form)
Private Sub TXT_Social_Security_Number_Exit(Cancel As Integer)
Social_Security_Number = Trim(TXT_Social_Security_Number.Value)
End Sub
Now I know that the variable is being assigned because I am running a check
before I open the second form and it is returning the value.
Secondary Form (FRM_Patient_Address):
Private Sub Form_Load()
Me.Modal = True
Me.DataEntry = True
Me.NavigationButtons = False
TXT_Social_Security_Number.Value = Social_Security_Number
TXT_Social_Security_Number.SetFocus
TXT_Social_Security_Number.Text = Social_Security_Number
End Sub
This does not seem to work and the variable never seems to get passed which
a quick MSGBOX check on Social_Security_Number makes obvious.
Any suggestions??
THanks a Lot!
Kris