D
DS
I have a Control on a Report that gets a value from the OpenArgs statement.
Whenever I use the Open Arg to assign this value the following code doesn't
work.
If I however assign the value via the control source in the field such as =1
the code works.
Here is the Code
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.TxtOK = DLookup("SecurityID", "tblSecurityDetails", "SecurityID = " &
Me.TxtID & " And SDPrivID = PrivID")
If Me.TxtOK = Me.TxtID Then
Me.BoxYes.Visible = True
Me.BoxNo.Visible = False
Else
Me.BoxYes.Visible = False
Me.BoxNo.Visible = True
End If
End Sub
I have a feeling that it's a timing issue. Does the Format run before tthe
OpenArg? If so how can I remedy this situation?
Thanks
DS
Whenever I use the Open Arg to assign this value the following code doesn't
work.
If I however assign the value via the control source in the field such as =1
the code works.
Here is the Code
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.TxtOK = DLookup("SecurityID", "tblSecurityDetails", "SecurityID = " &
Me.TxtID & " And SDPrivID = PrivID")
If Me.TxtOK = Me.TxtID Then
Me.BoxYes.Visible = True
Me.BoxNo.Visible = False
Else
Me.BoxYes.Visible = False
Me.BoxNo.Visible = True
End If
End Sub
I have a feeling that it's a timing issue. Does the Format run before tthe
OpenArg? If so how can I remedy this situation?
Thanks
DS