I was wondering if there is a way to check if a form is open, from the click event of a button on another form? And if so, was wondering what the syntax may be...
This was just addressed here 4 days ago; here's the link: thread705-474162
You really should try using the "search" feature here before posting a question. Many many questions have already been asked and answered (like this one) and you get your answer immediately.
Take care,
The Missinglinq "It's got to be the going,
not the getting there that's good!"
-Harry Chapin
cool thanks...I actually had a look through the search stuff and couldnt find what I was looking for.
I have used some of the suggested code which works fine, however I am getting an error on something else related.
I am trying to determine which form is open, then depending, I am trying to run an event procedure from that form.
This works fine for one form, however returns an error for other stating "Application-defined or object-defined error"...
Here is the code:
*****************
If (CurrentProject.AllForms("JobsBooked".IsLoaded) Then
MsgBox "Jobs booked is loaded"
Me.Visible = False
Forms!JobsBooked!CboSearchClient = strName
Forms.JobsBooked.cboSearchClient_AfterUpdate
Forms.JobsBooked.CboSearchClient = ""
DoCmd.Close acForm, stDocName
End If
If (CurrentProject.AllForms("JobsToDo".IsLoaded) Then
MsgBox "Jobs To Do is loaded"
Me.Visible = False
Forms!JobsToDo!CboSearchClient = strName
---> Forms.JobsToDo.cboSearchClient_AfterUpdate
Forms.JobsToDo.CboSearchClient = ""
DoCmd.Close acForm, stDocName
End If
*************
Where the arrow is, is where the error is occuring.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.