Subject Re: Preview.wfm and report printing
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Wed, 1 Nov 2023 14:30:44 -0700
Newsgroups dbase.getting-started

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.

Ken

--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm
dBASE DOS to Windows Tutorial:
http://www.goldenstag.net/dbase/DtoWTutorial/00_Menu.htm