Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form open

Status
Not open for further replies.

paulminne

Programmer
Nov 27, 2002
80
AU
Hi,

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...

Thanks
 
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.

Regards,

- Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top