Hey guys.. I need help on some programming... I need to query for soon to be overdue drawings... i understand that i can put:
"Between [enterdate] and dateAdd("d",14,[enterdate])"
The thing is, i need to find out the information on 3 different areas: Owner, Class & production.. Hence, i will have a total of 3 querys just so i could obtain information on these 3 fields...
I've tried to add them together and put it under the "or" function, but the outcome is empty...
So I've starting to write a program that helps me to combine all these 3 fields together, hoever, there's mistake that i can't seem to solve in this progra, and i hope you guys will help me out..
Here's the program i wrote:
Function CompareDate(ParamArray FieldArray() As Variant)
Dim J as Variant
Dim FirstDate As Variant
Dim IntervalType As String
Dim MyDate As Variant
Dim Number As Integer
IntervalType="d"
FirstDate= InputBox("EnterStartDate")
Number = InputBox ("ENTER NUMBER OF DAYS TO ADD")
MyDate = "NewDate: " & DateAdd(IntervalType,number,FirstDate)
MsgBox MyDate
If FieldArray(0) >= FirstDate And FieldArray(0) <= MyDate
Then J=FieldArray(0)
End If
CompareDate=J
End Function
Thanks guys...![]()