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

filter on a form

Status
Not open for further replies.

virginie

Programmer
Jul 24, 2002
53
IL
hi!
i have a form where i choose according to which fields filter a second form
i did:
Case 3
stLinkCriteria = "orders.supplier = '" & txtSupplier & "'"

the problem is that i want to filter my form per supplier like i did
but i want to filter the records where the field " payment_date" is not null too.
it means i want to display all the orders per supplier chosed that are not " closed" yet, that have to be payed.


my problem is that this "payment_date" is a field from a subform, "order_details", the lines for this order.
so i have n fields " payment_date", one per line in the order.
i have to check if:
if for a specific order to the supplier choosed, ALL the lines in the order are payed and filter them to show only the orders that have 1 or more lines in the details that are without "payment_date"yet.

how can i do that??

how can i change my filter:
stLinkCriteria = "orders.supplier = '" & txtSupplier & "'"
to display only those??






 
The records that appear in the order_details subform have no bearing on the records displayed in the second form, right? Why not just add a check to your stLinkCriteria for payments that have not been made yet?

For example:

stLinkCriteria = "orders.supplier = '" & txtSupplier & "' AND order_details.payment_date IS NOT NULL"

NOTE: I am assuming that order_details is the name of the table your join with the orders table in the second form's recordset.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top