F
Frank Ryan
When using fields from a form in a SQL statement to limit
records selected, it acts as if we had "<" instead of "<="
associated with the "To" field. For example, if the form
values were "03-0001" and "03-0272" respectively, then we
would be selecting records with "03-0001" thru "03-0271".
If we used LITERAL values in the SQL statement, then the
QUERY worked correctly. We got around this by appending
a "0" (zero character) to the end of the "To" field.
As follows: ... "<=[Forms]![RForm]![ToValue] + '0'" ...
This workaround gives us the correct selection results.
My question is whether anyone else has come across this
situation and if so, is there a better solution?
One last note ... the form "From / To" field values were
always correctly shown in the Report Heading!
records selected, it acts as if we had "<" instead of "<="
associated with the "To" field. For example, if the form
values were "03-0001" and "03-0272" respectively, then we
would be selecting records with "03-0001" thru "03-0271".
If we used LITERAL values in the SQL statement, then the
QUERY worked correctly. We got around this by appending
a "0" (zero character) to the end of the "To" field.
As follows: ... "<=[Forms]![RForm]![ToValue] + '0'" ...
This workaround gives us the correct selection results.
My question is whether anyone else has come across this
situation and if so, is there a better solution?
One last note ... the form "From / To" field values were
always correctly shown in the Report Heading!