PDA

Click to See Complete Forum and Search --> : Obtaining Date Values


nmretd
Jan 14th, 2000, 12:35 AM
I have two fields in an Access Database:

StartDate EndDate
1/12/99 6/2/99

Is there any way I can assign a variable to the values of these two fields and all of the dates in between.

i.e

I want to end up with something like:

sDate1 = 1/12/99
sDate1 = 2/12/99
sDate1 = 3/12/99
sDate1 = 4/12/99
sDate1 = 5/12/99
sDate1 = 6/12/99

If this is possible how could I code it in VB ?

Aaron Young
Jan 14th, 2000, 12:41 AM
You can't have a single variable represent multiple values, the closest you can get is to use an Array, but, if you know the Begin and End Values, just use those in your Expressions, ie.

If dSomeDate >= dBeginDate And dSomeDate <= dEndDate Then
'The Date "dSomeDate" Falls in the Range of Dates Represented by dBeginDate and dEndDate
End If


------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
ajyoung@pressenter.com