I'm currently trying to use OpenArgs.
I have one form called frmReferralsDischarges with a RAISENumber field and another form called frmOtherServices. The latter form requires information enterd on th 1st form to be stored in a seperate table but linked to the referral that is recorded in the first form (frmReferralsDischarges).
Whn in the Referrals frm, i have a cmd button (cmdOtherServices) which opens the Other Services form as a popup. I would like to use the OpenArgs condition to pass over the RAISENumber (and referral autonumber? see NB) On a related note, do the relationships set up in my table play any part here? NB: RAISENumber can be duplicated but a ReferralAutonumber has been assigned to the Referral to be the unique identifer. This field is also in the Other Services table but should also be passed over to retain the linkage between referral and other services.
PS
I have used the code provided on http://www.baldyweb.com/OpenArgs.htm
however when i try and run the code, i get this error
Compile Error: Invalid Outside Procedure
and it highlights the section in red
Dim strOpenArgs() As String
If Not IsNull(Me.frmOtherServices) Then
strOpenArgs = Split(Me.frmOtherServices, ";")
Me.RAISENumber = strOpenArgs(0)
Me.ReferralAutonumber = strOpenArgs(1)
Else
Me.txtOtherInfo = "Unknown"
End If
The section highlighted in blue, i haven't changed as I dunno wht to change it to
ALSO where does this code actually go?!
l3111, Manchester, UK