Specific Date for Select Case

todgers

Registered User.
Local time
Today, 00:04
Joined
Mar 28, 2006
Messages
42
OK I have done a select case as follows
Code:
Private Sub Form_Current()

Select Case DatePart("w", Tape_Date)
    Case 1, 3, 5

Clearly this runs/works on a Sunday, Tuesday and Thursday.

I have tried to adjust this to work on a specific date but I'm struggling.

Would I use 'datePart' or just 'Date' and what format in the case would I use.

Thanks in advance
 
You mean something like:

Select Case Tape_Date
Case 4/3/2006

???
 
Sorry tried that but it does not work.

Tape_date is the name of the date field on this form and I'm trying to make a combo box called 'Tape' visible on that specific date?
 
You may have to pound the date:

Case #4/3/2006#

???
 
todgers said:
Ken, I owe you a pint, thanks very much

Cool - :)

Still, something tells me it's bad juju to hard code a date param into your code like that - Will you ever need to consider any other date?
 
I will need to add other dates to a different field, why what do you suggest?
 

Users who are viewing this thread

Back
Top Bottom