Between statement form variables.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

I would like to pass 2 variable to a query criteria. The statement is a
Between statement on a date field and the 2 variables are the dates.

I have two-text field on a form that contains these variables.

I have tried this but it does not work, Any help woould be greatly
appricaited.

Between [forms]![frMain]![txDt1] and [forms]![frMain]![txDt2]

and

Between #[forms]![frMain]![txDt1]# and #[forms]![frMain]![txDt2]#

Nothing worked.
 
Sometimes Access has trouble correctly typing the "variables", Try using CDate
around the control references.

Between CDate([forms]![frMain]![txDt1]) and CDate([forms]![frMain]![txDt2])
Mark said:
Hello all,

I would like to pass 2 variable to a query criteria. The statement is a
Between statement on a date field and the 2 variables are the dates.

I have two-text field on a form that contains these variables.

I have tried this but it does not work, Any help woould be greatly
appricaited.

Between [forms]![frMain]![txDt1] and [forms]![frMain]![txDt2]

and

Between #[forms]![frMain]![txDt1]# and #[forms]![frMain]![txDt2]#

Nothing worked.
 
Back
Top