Help with Popup search form

G

Greg Snidow

Greetings all. In Access 2003 I have frmEWO with stored procedure as record
source, and input parameter set to @enter_ewo = forms!frmSearchPopUp!txtEWO.
On frmSearchPopUp there is text box txtEWO and command button cmdSearch. On
my switchboard there is a command button to open frmSearchPopUp to search for
a job#. When the user enters in a value in txtEWO and hits cmdSearch the
form frmEWO opens to the record according to the value in txtEWO as it
should. I am trying to make frmSearchPopUp know if frmEWO is opened or not.
If it is not opened I want it to open as it does currently. If it is already
opened, however, I want it to requery frmSearchEWO based on the value in
txtEWO, just like it does when it opens frmEWO. I do not know how to make
something like the following work. Does anyone have any ideas? Thank you.
************************************************************
cmdSearch_click
If Forms!frmEWO!..? (is already opened) Then
Forms!frmEWO.Requery
Else
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmEWO"
DoCmd.OpenForm stDocName, , , stLinkCriteria

End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top