How do you use a between function as a criteria to open a form?
I have tried this on many ways but is doesn't work.
Dim stCriteria as String
Dim stDateFirst as Date
Dim stDateLast as Date
Dim stFormName as String
stFormName = "Frm_IKA"
stDateFirst = dateDatum1
stDateLast = dateDatum2
stCriteria = Between & " [Date] = #" & stDateFirst & "# And [Date] = #" & stDateLast & "#"
docmd.openForm stFormName,,stCriteria
Live fast, die young and leave a beautiful corpse behind.
I have tried this on many ways but is doesn't work.
Dim stCriteria as String
Dim stDateFirst as Date
Dim stDateLast as Date
Dim stFormName as String
stFormName = "Frm_IKA"
stDateFirst = dateDatum1
stDateLast = dateDatum2
stCriteria = Between & " [Date] = #" & stDateFirst & "# And [Date] = #" & stDateLast & "#"
docmd.openForm stFormName,,stCriteria
Live fast, die young and leave a beautiful corpse behind.