M
Maresdd
I have written some vba code to check if a form is loaded. If the form is
loaded then it is to populate a control on another form with the control
value. The problem I'm having is that if that control is blank then I get an
error message. How do I write this correctly. What I have so far is:
Private Sub Form_Open(Cancel As Integer)
If CurrentProject.AllForms("frmclientenqaccs").IsLoaded And Not
IsNull(Forms!frmclientenqaccs!clientenqaccssubform![Service No]) Then
Me.Service_Plan_ID = Forms!frmclientenqaccs!clientenqaccssubform![Service No]
Call Service_Plan_ID_AfterUpdate
End If
End Sub
Thank you in advance.
loaded then it is to populate a control on another form with the control
value. The problem I'm having is that if that control is blank then I get an
error message. How do I write this correctly. What I have so far is:
Private Sub Form_Open(Cancel As Integer)
If CurrentProject.AllForms("frmclientenqaccs").IsLoaded And Not
IsNull(Forms!frmclientenqaccs!clientenqaccssubform![Service No]) Then
Me.Service_Plan_ID = Forms!frmclientenqaccs!clientenqaccssubform![Service No]
Call Service_Plan_ID_AfterUpdate
End If
End Sub
Thank you in advance.