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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing variables into a Command in dataenvironment

Status
Not open for further replies.

gabtech

IS-IT--Management
Apr 21, 2004
3
KE
Please help

I am trying to pass two variables defined by the user from a DBcombo1.text and Dbcombo2.text. I want to pick all records from an Access table that do match the SQL statement defined as follows in a Command in Dataenvironment,

SELECT policydetails.pol_no, format([inst_due_date],"yyyy") as Rp_year, format([inst_due_date],"mmm") as Rp_month, Ins_description, customer_no
FROM PolicyDetails
where Rp_month = param1
and RP_year = Param2

my idea is for the report to return records that DBcombo1.text , Dbcombo2.text and Rp_month, Rp_year are matching respectively.

at the point of compilation i get the massage;

"Argument not optional "

at the statement;

DataEnvironment1.notices (RP_month)

What can i do to get my results?

Gabtech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top