G
Guest
I created this OnClick code for a command button to pass an argument to the
form I'm opening. The problem is that for some reason when the form open
procedure on the other form runs the field Me.RawInputID shows that it is a
Null value. I placed a breakpoint before the End If statement of this code
and looked at the value of the field Me.RawInputID and it shows up with the
correct value. But on the opening form, when I set my variable equal to the
open arguments the value of open arguments is shown as null.
I'm not sure what I'm doing wrong here and I hope that I was clear, but if
you need any further information please let me know.
Command Button Code:
Dim Message As String
Dim Buttons As String
Dim stDocName As String
Dim stLinkCriteria As String
Message = "Enter Raw Product Information first."
Buttons = vbOKOnly
stDocName = "ProductOutputEntryForm"
stLinkCriteria = "[RawInputID] =" & Me.RawInputID
If IsNull(Me.RawInputID) Then
Cancel = MsgBox(Message, Buttons, "Missing Information") = vbCancel
Else
DoCmd.OpenForm stDocName, , , , , , Me.RawInputID
End If
Form Open Code:
Dim intRawInputID As Integer
Dim rst As DAO.Recordset
Dim stLinkCriteria As String
intRawInputID = Me.OpenArgs
Thanks for any help...
form I'm opening. The problem is that for some reason when the form open
procedure on the other form runs the field Me.RawInputID shows that it is a
Null value. I placed a breakpoint before the End If statement of this code
and looked at the value of the field Me.RawInputID and it shows up with the
correct value. But on the opening form, when I set my variable equal to the
open arguments the value of open arguments is shown as null.
I'm not sure what I'm doing wrong here and I hope that I was clear, but if
you need any further information please let me know.
Command Button Code:
Dim Message As String
Dim Buttons As String
Dim stDocName As String
Dim stLinkCriteria As String
Message = "Enter Raw Product Information first."
Buttons = vbOKOnly
stDocName = "ProductOutputEntryForm"
stLinkCriteria = "[RawInputID] =" & Me.RawInputID
If IsNull(Me.RawInputID) Then
Cancel = MsgBox(Message, Buttons, "Missing Information") = vbCancel
Else
DoCmd.OpenForm stDocName, , , , , , Me.RawInputID
End If
Form Open Code:
Dim intRawInputID As Integer
Dim rst As DAO.Recordset
Dim stLinkCriteria As String
intRawInputID = Me.OpenArgs
Thanks for any help...