Form Open Event

Dalorax

Registered User.
Local time
Today, 06:38
Joined
Aug 8, 2005
Messages
12
I'm trying to open a form based on another form and have the following code in the Open Event:

Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_FormOpen
Dim strForm As String

strForm = "frmProductionBatch"
If IsLoaded(strForm) Then
Me.ProductName = Forms![frmProductionBatch]![ProductName]
Me.BatchNum = Forms![frmProductionBatch]![BatchNum]
Else
End If

Exit_FormOpen:
Exit Sub
Err_FormOpen:
MsgBox Err.Description
Resume Exit_FormOpen

End Sub

It works however I get an error message stating that I cannot assign a value to this Object?
What is going on here?
 
Try load event instead.
 
That worked!
Thanks
 

Users who are viewing this thread

Back
Top Bottom