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!

i want to ask for a query: SELECT 1

Status
Not open for further replies.

virginie

Programmer
Jul 24, 2002
53
IL
i want to ask for a query:
SELECT *
FROM order_details INNER JOIN orders ON order_details.id_order=orders.id_order
WHERE commitment_date <> &quot;&quot;;

i mean where this field is empty

why this is not working ??

 
SELECT *
FROM order_details INNER JOIN orders ON order_details.id_order=orders.id_order
WHERE commitment_date IS NOT NULL -----------------------------------------------------------------
[pc] Be nice. It's only doing what you tell it to do.
mikewolf@tst-us.com
 
can i ask for another little thing?

Dim stDocName As String
Dim stLinkCriteria As String

Select Case framFilter
Case 1
stLinkCriteria = &quot;&quot;
Case 2
stLinkCriteria = &quot;orders.id_order = &quot; & txtID & &quot;&quot;
Case 3
stLinkCriteria = &quot;orders.supplier = '&quot; & txtSupplier & &quot;'&quot;
Case 4
stLinkCriteria = &quot;orders.employee = '&quot; & employ & &quot;'&quot;
Case 5
stLinkCriteria = &quot;orders.commitment_date = ' '&quot;
Case 6
stLinkCriteria = &quot;order_details.invoice_date = ' '&quot;
Case 7
stLinkCriteria = &quot;order_details.payment_date = ' '&quot;

End Select

'open this form with the data from the framFilter
'''''''''''''''''''''''''''''''''''''''''''''''

stDocName = &quot;see_order&quot;
DoCmd.OpenForm stDocName
Forms(stDocName).Filter = stLinkCriteria
Forms(stDocName).FilterOn = Len(stLinkCriteria) > 0
everithing is just fine

but look at case 5,6,7
5 : i want to display here the records where this field (date) is empty

case 6 and 7 :
same thing exactly but :
they are on a subform of this form....

how can i do that??
 
I'm not real sure what you are trying to do. I don't use access forms (I use asp). Does this help?

Case 5
stLinkCriteria = &quot;orders.commitment_date = IS NULL&quot;
Case 6
stLinkCriteria = &quot;order_details.invoice_date IS NULL&quot;
Case 7
stLinkCriteria = &quot;order_details.payment_date IS NULL&quot;


You may need to say ....
order_details.payment_date IS NULL OR order_details.payment_date = '' -----------------------------------------------------------------
[pc] Be nice. It's only doing what you tell it to do.
mikewolf@tst-us.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top