General information
Category:
Coding, syntax & commands
Title:
Form-Fed Date for Select
I'm trying to set up a form to input a date, and run a
query using the date as a filter. I have a text field
on the form, not tied to any table in the data environment,
with a control source of ldpickup, and code for a button's
click event as shown below. The thing keeps giving me
operand/operator type mismatches.
I'm pretty sure I'm handling something wrong on the WHERE
clause but I can't find it. I've tried single quotes,
parentheses, DTOC(), CTOD(), and looked in a few FAQ's
and am out of guesses. Does anyone have the syntax for this?
-----------------
LOCAL ldpickup
CLOSE DATABASES
OPEN .\data\tracker
SELECT Hospital.chospnam, Masspu.ddate, Masspu.nsmall, ;
Masspu.nlarge ;
FROM tracker!hospital INNER JOIN tracker!masspu ;
ON Hospital.iacctno = Masspu.iacctno ;
WHERE Masspu.ddate = ldpickup ;
INTO TABLE .\data\tqbill01
SELECT Hospital.chospnam, Indivpu.csize, Indivpu.curn, ;
Indivpu,ncremid, Indivpu.cownlnam ;
FROM tracker!hospital INNER JOIN tracker!indivpu ;
ON Hospital.iacctno = Indivpu.iacctno ;
WHERE Indivpu.dpickup = ldpickup ;
INTO TABLE .\data\tqbill02
REPORT FORM .\reports\rpbill NOCONSOLE PREVIEW
-----------------
Thank you ...
- Bob Longmire
- Hillside IL
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only