Hi guys,
I am having a query where BillNumber is passed from either a form or Report to a query to generate Bill (in report format). I have set up the query in which Bill Number is either passed from Form (text box input) or through report (from number of bills user can click of desired one). Both functions work fine, But whenever I am trying to pass the argument through Form (textbox), it ask me for the input of report, also pressing ENTER (with blank input) bypasses the problem but on first place it should not happen. The screen is quiet annoying. For your reference query is given below:
SELECT tblSale.SaleDate, tblSale.Challan, tblSale.BillNumber, tblSale.Transport, tblSale.GRNumber, tblParties.PartyName, tblParties.Address, tblParties.City, tblParties.State, tblParties.GSTNo, tblParties.StateCode, tblSale.InvoiceAmt, tblSale.InvCGST, tblSale.InvSGST, tblSale.InvIGST, tblSale.FinalAmt, tblSale.Freight, tblSale.ReverseCharges, tblSale.RoundingOff, tblSale.GrandTotal, tblSale.ReverseCharge, tblSale.InvoiceType, tblSale.EComm, tblSale.Cess, tblParties_1.PartyName, tblParties_1.Address, tblParties_1.City, tblParties_1.State, tblParties_1.GSTNo, tblParties_1.StateCode
FROM tblParties INNER JOIN (tblSale INNER JOIN tblParties AS tblParties_1 ON tblSale.ShipToID_FK = tblParties_1.BuyerID_PK) ON tblParties.BuyerID_PK = tblSale.BuyerID_FK
WHERE (((tblSale.BillNumber)=[Forms]![PrintBill]![BillNum] Or (tblSale.BillNumber)=[Reports]![rptBills1Criteria]![BillNumber]));
I can always create a separate query, But want to fix this one & learn my mistake.
Thanks for your help.
Regards
Deepak Gupta