M Marky Registered User. Local time Tomorrow, 05:08 Joined Mar 26, 2012 Messages 14 Oct 17, 2013 #1 How can I set Month or Year default as per the system date. ie Only select records by Month (October) or Year (2013) as per system date?
How can I set Month or Year default as per the system date. ie Only select records by Month (October) or Year (2013) as per system date?
MarkK bit cruncher Local time Today, 10:08 Joined Mar 17, 2004 Messages 8,571 Oct 17, 2013 #2 Check out the Month(), Year(), and Date() functions provided by VBA. To set the Default Value of a control, check out the control's DefaultValue property. To return records by month and year for a particular date, you can write a WHERE clause like . . . Code: WHERE Month([YourDateField]) = Month(Date()) AND Year([YourDateField]) = Year(Date()) hth
Check out the Month(), Year(), and Date() functions provided by VBA. To set the Default Value of a control, check out the control's DefaultValue property. To return records by month and year for a particular date, you can write a WHERE clause like . . . Code: WHERE Month([YourDateField]) = Month(Date()) AND Year([YourDateField]) = Year(Date()) hth
M Marky Registered User. Local time Tomorrow, 05:08 Joined Mar 26, 2012 Messages 14 Oct 17, 2013 #3 Thanks a lot, I'll try that. It should work. Just to clarify, a form/report etc should only have this month's records or this year's records without using the filter options. Cheers
Thanks a lot, I'll try that. It should work. Just to clarify, a form/report etc should only have this month's records or this year's records without using the filter options. Cheers
MarkK bit cruncher Local time Today, 10:08 Joined Mar 17, 2004 Messages 8,571 Oct 17, 2013 #4 Marky said: Just to clarify, a form/report etc should only have this month's records or this year's records without using the filter options. Click to expand... Ahh, what is clarified here? You asked cryptically about dates, defaults, and selecting records. Nothing about forms/reports.
Marky said: Just to clarify, a form/report etc should only have this month's records or this year's records without using the filter options. Click to expand... Ahh, what is clarified here? You asked cryptically about dates, defaults, and selecting records. Nothing about forms/reports.