Have a form that opens another form and need to pass info from first form to next. Second form is a dialogue box.
Here is the code from the first form, and the code in the Open event for the dialoguebox follows. i had this working briefley, but made a chande to the dialoge, which I have since removed, which caused Run-time error 2501
The OpenForm action was cancelled. Reading up on the error is was indicated the problem is bad code in the dialogue box, but the only code in there is the open code below. Bay01 in an unconnected label, and there are several such on the screen. Tried importing the dialogue form from another version that I have, it opens but the argument is not passed.
Private Sub Bay01_DblClick(Cancel As Integer)
EventSwitch = True
Dim fromCtl As String
fromCtl = "Bay01"
DoCmd.OpenForm "BaysFilled", , , , , , fromCtl
EventSwitch = False
End Sub
Private Sub Form_Open(Cancel As Integer)
Dim fillBayArg As String
fillBayArg = fromCtl
Back at the well again.
thanks in advance
jpl
End Sub
Here is the code from the first form, and the code in the Open event for the dialoguebox follows. i had this working briefley, but made a chande to the dialoge, which I have since removed, which caused Run-time error 2501
The OpenForm action was cancelled. Reading up on the error is was indicated the problem is bad code in the dialogue box, but the only code in there is the open code below. Bay01 in an unconnected label, and there are several such on the screen. Tried importing the dialogue form from another version that I have, it opens but the argument is not passed.
Private Sub Bay01_DblClick(Cancel As Integer)
EventSwitch = True
Dim fromCtl As String
fromCtl = "Bay01"
DoCmd.OpenForm "BaysFilled", , , , , , fromCtl
EventSwitch = False
End Sub
Private Sub Form_Open(Cancel As Integer)
Dim fillBayArg As String
fillBayArg = fromCtl
Back at the well again.
thanks in advance
jpl
End Sub