I am passing information from one form to another by creating a variable called InfoFields and then splitting the variable into various parts to assign to new fields.
Unfortunately, the fields that I am trying to pass are different types (numbers and text) and I am getting a mismatch error when I trigger the code.
My Code is ..
Code:
Private Sub AddFamilyMemberBttn_Click()
'Capture info to pass to New Form
Dim InfoFields as String
InfoFields = Me.Family_ID + ";" + Me.Full_Name + ";" + Me.Address_Line1 + ";" + etc etc
DoCmd.OpenForm "New_Fam_Mem", acNormal,,,acFormAdd,,InfoFields
End Sub
Me.Family_ID is Numeric and other fields are Text
On my second form I split the args with the following code ..
Code:
Private Sub Form_Load()
If Not IsNull(Me.OPenArgs) then
Args = Split(Me.OpenArgs, ";")
Me.Family_ID = CInt(Args(0))
Me.Name = CStr(Args(1))
etc etc
End If
End Sub
This all works fine if I remove the Numeric Field, but Is there anyway of passing multiple args of diffrent types?
Any help would be appreciated
Stuart