multiple dates <>

teiben

Registered User.
Local time
Today, 18:06
Joined
Jun 20, 2002
Messages
462
Need to automate the process of pulling data from a db, but unsure of how to proceed, instead of the typical enter a date or enter a date range, i need to enter up to 7 dates to exclude from a data pull. I understand how to do it in a paramter query, how would this been done on a form? Most dates DO not occur in the same month.
 
Need to automate the process of pulling data from a db, but unsure of how to proceed, instead of the typical enter a date or enter a date range, i need to enter up to 7 dates to exclude from a data pull. I understand how to do it in a paramter query, how would this been done on a form? Most dates DO not occur in the same month.

Excluding an individual item can be done by using <>.
Excluding an group of items can be done by using NOT IN().

Based on those rules, you should try to create a method of entering the parameter group, and use NOT IN.

One idea that you might be thinking of would be to use 7 Text Boxes to enter the dates, and exclude any that have no value when creating the NOT IN Statement. THIS WOULD BE A TERRIBLE IDEA. In the event that you ever needed 8 or more dates, you would need to rewrite the code in the Form.

A better way would be to use VBA to create a date entry system that accepted new dates until a NULL entry was encountered. This is a much better idea since it would be much more flexible.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom