I icemac Registered User. Local time Yesterday, 21:05 Joined Jul 17, 2006 Messages 31 Jan 2, 2007 #1 My customer searches hires a car between two dates - StartDate and EndDate. I want to build an expression that searches my database for all the customers currently using cars (using cars on the day of the search.) How can this be done?
My customer searches hires a car between two dates - StartDate and EndDate. I want to build an expression that searches my database for all the customers currently using cars (using cars on the day of the search.) How can this be done?
M Moniker VBA Pro Local time Yesterday, 23:05 Joined Dec 21, 2006 Messages 1,567 Jan 3, 2007 #2 Show the customers where (StartDate <= Now()) AND (EndDate >= Now()). In other words: SELECT * FROM YOUR_CUSTOMER_TABLENAME WHERE YOUR_CUSTOMER_TABLENAME.StartDate <= Now() AND YOUR_CUSTOMER_TABLENAME.EndDate >= Now(); ~Moniker
Show the customers where (StartDate <= Now()) AND (EndDate >= Now()). In other words: SELECT * FROM YOUR_CUSTOMER_TABLENAME WHERE YOUR_CUSTOMER_TABLENAME.StartDate <= Now() AND YOUR_CUSTOMER_TABLENAME.EndDate >= Now(); ~Moniker
Wiz47 Learning by inches ... Local time Today, 00:05 Joined Nov 30, 2006 Messages 274 Jan 3, 2007 #3 Moniker said: Show the customers where (StartDate <= Now()) AND (EndDate >= Now()). In other words: SELECT * FROM YOUR_CUSTOMER_TABLENAME WHERE YOUR_CUSTOMER_TABLENAME.StartDate <= Now() AND YOUR_CUSTOMER_TABLENAME.EndDate >= Now(); ~Moniker Click to expand... SELECT * From Your_Customer_TableName WHERE Your_Customer_TableName.Customer and BETWEEN [StartDate] and [EndDate]; Click to expand... Where: Your_Customer_TableName the name of your table Your_Customer_TableName.Customer the field that Id's the customer Last edited: Jan 3, 2007
Moniker said: Show the customers where (StartDate <= Now()) AND (EndDate >= Now()). In other words: SELECT * FROM YOUR_CUSTOMER_TABLENAME WHERE YOUR_CUSTOMER_TABLENAME.StartDate <= Now() AND YOUR_CUSTOMER_TABLENAME.EndDate >= Now(); ~Moniker Click to expand... SELECT * From Your_Customer_TableName WHERE Your_Customer_TableName.Customer and BETWEEN [StartDate] and [EndDate]; Click to expand... Where: Your_Customer_TableName the name of your table Your_Customer_TableName.Customer the field that Id's the customer