fyi .. let me tell you the scenario .. i am using two databases penbl and other one contr , further both the data bases have a field called contr_no, and i want to dispaly the contents of contr_no from both databases in one data report.

All works fine till i place the textboxes of command1 of dataenvironment but if i put the textboxes of command2 then i get error message

Error : -
DataField'Command2.contr_no'not found

Can someone help me with as to how can i display both the contr_no in one datareport.

This code i have placed in the command button

Private Sub Command1_Click()

DataEnvironment1.Command1 (CStr(txt_blnbr))
Set DataReport1.DataSource = DataEnvironment1.rsCommand1

'forchecking whether the records are found
a = DataEnvironment1.rsCommand1.RecordCount

DataReport1.Show

End Sub

This is the sql statement for command1 , hbl is primarykey
SELECT hbl,contr_no, stuffpoint, etd, bkg_no, blflag FROM penbl WHERE (hbl = ?)

This is the sql statement for command2 , here hbl is foreign key
SELECT contr.contr_no, contr.seal_no, contr.contr_type, contr.hbl, penbl.hbl AS Expr1 FROM penbl, contr WHERE penbl.hbl = contr.hbl AND (penbl.hbl = ?)

Looking forward for help ... Thanks very much in anticipation
Shaju Devassy