Murray Brown
asked on
Access VBA Trigger code in form when text box is populated from another form
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. I got "method or data member not found" and the word "currentproject" part was highighted
ASKER
Hi Dale. I used the following code but it doesn't get to the last line, which is what I need. Am I missing something?
Me.LicenceNo.Visible = True
oForm = Me.Name
oTextBox = Me.LicenceNo.Name
DoCmd.OpenForm FormName:="f_List_Licence", windowmode:=acDialog
If CurrentProject.AllForms("f_List_Licence").IsLoaded = False Then
Exit Sub
End If
Call LicenceNo_AfterUpdate
Me.LicenceNo.Visible = True
oForm = Me.Name
oTextBox = Me.LicenceNo.Name
DoCmd.OpenForm FormName:="f_List_Licence", windowmode:=acDialog
If CurrentProject.AllForms("f_List_Licence").IsLoaded = False Then
Exit Sub
End If
Call LicenceNo_AfterUpdate
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much Dale
Glad to help, Murray, it's been a while since I've had the time to contribute much here on EE.
Dale
Dale
First make the function on your main form Public.
Then you can call it from another form with something like the following:
Forms!AnotherForm.YourCommand