On 11/1/2023 1:05 PM, trevor wrote: > Ken Mayer wrote: > >> Try making this: >> q.active = true >> >> active is a property of the query object. You may want to start using >> the assignment operator: >> >> q.active := true >> >> If you had done that above, with: >> active := true >> >> >> > Ken, > > q.active := true now and I get an error "invalid field name " at > that line. I've checked for typos so assume q.sql is incorrect.?
q.sql = 'select * from "transfers.DBF" where transfer > "' + fdat1 '+'"'
Try this. fdat1 is a variable, not a field. It is assuming a field. It
should be in quotes most likely, SQL and dates ... since you delimited
the string with single quotes, we're using double-quotes around the
fieldname ... To see what the string looks like once you have filled it,
try:
? q.sql
That should show in the syntax is correct, at least.