current open form

  • Thread starter Thread starter Taher
  • Start date Start date
T

Taher

Hi there

I have queries which gets the information from the combo
boxes of the form which are open currently. But as there
are many forms i need to have many queries, doing the same
function for the forms. I was thinking if i could have any
code in vba or sql like "currentopenform which could help
the query recognize the curretnly open form and gets the
information from there. By doing this i can have only one
query for diffrent forms.
 
Why do you have multiple forms/queries that do the same thing?

If you have a query that pulls data from a form, it should not be able to
get that data from just any form. Each form should be unique. For example,
my "work in process" query has to pull start and stop dates from a
particular form. If my user had their "Employee Data Form" open, or their
"Client Budget" form, those forms would not contian the fields to run the
Work in process report. Not sure how you could just grab any ole form.

If you have multiple forms that look exactly the same, then you may need to
rethink your design. You should have one form and then apply filters, or
use code to change the way it works based on some criteria.

Please give more details.

Rick B


Hi there

I have queries which gets the information from the combo
boxes of the form which are open currently. But as there
are many forms i need to have many queries, doing the same
function for the forms. I was thinking if i could have any
code in vba or sql like "currentopenform which could help
the query recognize the curretnly open form and gets the
information from there. By doing this i can have only one
query for diffrent forms.
 
Dear Taher:

There can be several forms open at any given time. Probably you are
referring to the one form that has the "focus". Otherwise, if there
are several forms open, the system would find this ambiguous.

Are you thinking that you will have one query that can derive a value
from any one of several forms? Please give a bit of detail what is
going on. Do you have a number of nearly identical forms that vary
only in some small particulars?

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Back
Top