Talk about resurecting this thread from the dead!
But would anyone be able to give an example of this?
I was looking around on some other forums and found the following:
In the FIRST form declare a public function:
Public Function ParseText(TextIn As String, x) As Variant
On Error Resume Next
Dim Var As Variant
Var = Split(TextIn, "|", -1)
ParseText = Var(x)
End Function
Then Pass the openarg data:
Private Sub BtnContinue_over_Click()
Dim stDocName As String
Dim stLink1 As String
Dim stLink2 As String
Dim stLink3 As String
stLink1 = Me.Contracts_CustomerName
stLink2 = Me.Contracts_ContractStatus
stLink3 = Me.Contracts_ContractNum
stDocName = "Quotes"
DoCmd.OpenForm stDocName, , , , , , "stLink1|stLink2|stLink3"
DoCmd.Close acForm, "Contracts"
DoCmd.GoToRecord , , acNewRec
In the FORM_LOAD event of the SECOND form use:
If Not IsNull(Me.OpenArgs) Then
Dim strA As String
Dim strB As String
Dim strC As String
strA = ParseText(OpenArgs, 0)
strB = ParseText(OpenArgs, 1)
strC = ParseText(OpenArgs, 2)
MsgBox "The OpenArgs are:" & vbNewLine & strA & " " & strB &
vbNewLine & strC & " " & strD
I tried using this and it keeps saying "Compile Error: Sub or Function not Defined" and it highlights 'ParseText'
I'm guessing its the public function thats not really working? or is that code bad? help please!
