Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RecordSelectionFormula Syntax

Status
Not open for further replies.

msay

Programmer
Aug 17, 2001
56
US
Can anyone tell me why this formula gets a "The remaining text does not appear to be a part of the formula." ERROR ?

Report.RecordSelectionFormula = "{ado.year} =" + "'" + Form6.Combo1.Text + "'" + "{ado.month} =" + "'" + Form6.Combo2.Text + "'"
 
It might be because of the quotes around the values (I think CR wants numbers there, not text).
Greetings,
Rick
 
try:

Report.RecordSelectionFormula = "{ado.year} =" + "'" + Form6.Combo1.Text + "' AND " + "{ado.month} =" + "'" + Form6.Combo2.Text + "'"
 
Oops, that's a nice observation too (totally missed that one....)
Greetings,
Rick
 
Thank you Don. That worked. I've been pulling my hair out!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top