Jean said:
Hi,
The following formula is in a qry. Can anyone tell me
what the plus 6 is/does? THANKS.
Between [Forms]![frm_call_import]![txt_from].[value] And
[Forms]![frm_call_import]![txt_to].[value]+6
Jean,
The form is used to enter a starting date and ending date that is used
by the query as a parameter.
The + 6 appears to be redundant.
I could understand it's use if the criteria read:
Between [Forms]![frm_call_import]![txt_from].[value] And
[Forms]![frm_call_import]![txt_From].[value]+6
(I changed the [txt_To] to [txt_From])
After the change, if the date was then entered as 12/11/2003, the
parameter would read
Between 12/11/2003 and 12/17/2003 (i.e. 12/11/2003 + 6 days).
However in this actual case, the user has to enter both a From date and
a To date, so why enter the same date twice, i.e. ...
Between 12/11/2003 and 12/11/2003 + 6 ?
Either enter the txt_To date directly as 12/17/2003 (and not add the 6
days) or simply reuse the [txt_From] + 6, and not use [txt_To] at all.
Note also that there is no need to use the .Value property in this
expression.
Value is the default property, so use
Between [Forms]![frm_call_import]![txt_from] And
[Forms]![frm_call_import]![txt_From] + 6
Remove that second control, ([txt_To]) from the form.