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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open form using different query criteria?

Status
Not open for further replies.

Cassiopeia

Technical User
Sep 30, 2001
9
0
0
FI
Hi!

Is there any "open arguments" or similar to run a query?

What I want to do is to open a form based on a query in two different ways. One button opens records showing all orders there is and another button opens only the "undelivered orders". I would like to use the same form based on the same query. Is this possible?

Thanks, Cassio
 
Yes it's possible. But a little more detail is required. How do you indicate that a order is delivered/undelivered? And do you have a form for the user to change the criteria (ie. a checkbox for undelivered only)?

Jim.
 
The form itself (the one I wish to open in two different ways) has a button which sets the Is_Delivered field in the tbl_order_head to true. It's a Yes/No field. This field, of course, is the criteria (<> true) when opening the form showing only undelivered orders. It is this criteria I wish to bypass when I open the form to show all the orders, delivered and undelivered. (It's an archive-option where I can look at all the orders.) I intend to open the form in &quot;read only&quot; mode if I open it in &quot;archive-mode&quot;.

Thanks, Cassio
 
dear cassiopeia,

I still have only a little idea of what your form looks like, so i hope you can change the following to your needs or at least get an idea, how you could do it.


If had to do it, I would have a checkbox on the form, beeing the criteria for your yes/no field in the query (do it in the query by right-clicking in the criteria then choose build.. and reference to the ckeckbox.value)
the I would trigger the onclick event of the checkbox and have a little code-snippet, that changes the edit mode of the form.

hope that helps.

regards Astrid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top