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

Problem with List box parameter when closing a form

Status
Not open for further replies.

Zukkster

Technical User
Mar 18, 2002
61
GB
I've included a list box in my form that has a SQL statement as the Row source. The SQL statement references a text box on the form.

the SQL statement is;

SELECT DISTINCTROW tblCouponDetail.PrintingMCLU, tblCouponDetail.Description, tblCouponDetail.Segment, tblCouponDetail.CouponType
FROM tblCouponDetail
WHERE (((tblCouponDetail.ContractNumber)=[Forms]![frmInputCouponDetail]![txtContractNumber]));

This works fine until I close the form using the statement

DoCmd.Close acForm, "frmInputCouponDetail"

I get a dialogue box asking me for a parameter value for

Forms!frmInputCouponDetail!txtContractNumber

I've looked all over and can't see anything that is causing this. How do I stop it?

Thanks
 
Set your listbox RowSource to an empty string before closing your form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top