Share via

Query Expression Between dates

Anonymous
2024-08-06T03:18:20+00:00

Hello,

I have the below expression in a query, date field.

It works well, but I noticed it didn't grab the records of 7/31/2024. It grabbed all the other dates between 7/1 and 7/31 though.

I modified the expression by replacing the "Between" and "And" with >= and <= but the query still didn't grab the 7/31/2024.

Could you help me fix this expression to include the dates between and include the dates in the FechaIncio and FechaFinal fields, example 7/1/2024 and 7/31/2024?

Between [Forms]![frm_MonthlyFinancialReport]![FechaInicio] And [Forms]![frm_MonthlyFinancialReport]![FechaFinal]

FechaInicio: 7/1/2024

FechaFinal: 7/31/2024

>=[Forms]![frm_MonthlyFinancialReport]![FechaInicio] And <=[Forms]![frm_MonthlyFinancialReport]![FechaFinal]

Your help is greatly appreciated.

Iram/mcp

Microsoft 365 and Office | Access | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2024-08-06T08:05:48+00:00

Perhaps the field has a time component. Try

>=[Forms]![frm_MonthlyFinancialReport]![FechaInicio] And <[Forms]![frm_MonthlyFinancialReport]![FechaFinal]+1

Note that we use < here and not <=.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful