Listbox Issue - Current System Date

PD1978US1

Registered User.
Local time
Today, 09:23
Joined
Dec 21, 2017
Messages
19
Hi All,

I have a Listbox and I would like to only display the orders which have been created and shipped on the current date (sysdate).

In the table / query I have the ship date and time in one column.

Is there a way I can alter the properties of the Listbox to only take orders which were created and shipped the same day?
 
add a criteria on the listbox
rowsource SQL:

select field1, field2 from table where [orderDateField]=[shippedDate] and [orderDateField]=Date
 
Actually if it's a date and time Arne's code will need a little tweaking
Code:
Select Field1, Field2 From Table Where DateValue([OrderDate]) = DateValue([ShippedDate]) AND DateValue([OrderDate]) = Date()
 
I am a bit clueless.
I understand where to put the expression but not how.
I have 8x columns in the table and I presume I have to add something to ADDDATE and ACTUALSHIPDATE.

The query gives me both adddate and actualshipdate...

Do I have to take this over one to one:

Select Field1, Field2 From Table Where DateValue([OrderDate]) = DateValue([ShippedDate]) AND DateValue([OrderDate]) = Date()
 
Just substitute Field1 , Field2 etc for the fields in your list box. If your dates are AddDate and ActualShipdate then your listbox rowsource will look like;


Select YourListField1, YourListField2 From Table Where DateValue([AddDate]) = DateValue([ActualShipDate]) AND DateValue([AddDate]) = Date()

Replace the red bits with your field names.
 

Users who are viewing this thread

Back
Top Bottom