Link to home
Start Free TrialLog in
Avatar of maxlint
maxlint

asked on

Enter Value Parameter dialog box displays upon form exit -- it shouldn't.

I am using Access 2002

I have a form with with a combo box that has the following for the row source:

SELECT pid.pidname, pid.pidmonthyy, pim.pimcat, pid.pidtype, pid.pidid FROM pid INNER JOIN pim ON pid.pimid = pim.pimid WHERE (((pim.pimcat)=[forms]![pid].[picname]) AND ((pid.pidmonthyy)=[forms]![pid].[picdm])) ORDER BY pid.pidname, pid.pidtype, pid.pidmonthyy;

The logic works find while using the form.  The above select statement is using two values from two combo boxes on the this form to narrow do the selection list in this combo box.

The problem is when you exit the form.  A Enter Value Parameter forms!pid.picname dialog form appears and it shouldn't.

What can I do to correct this?

Thank you.
Max
Avatar of stevbe
stevbe

Hi Max,

What is the code in the Form_Close event?

Steve
ASKER CERTIFIED SOLUTION
Avatar of Mike Eghtebas
Mike Eghtebas
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
On ) is missing, use:

SELECT pid.pidname, pid.pidmonthyy, pim.pimcat, pid.pidtype, pid.pidid FROM pid INNER JOIN pim ON pid.pimid = pim.pimid WHERE (pim.pimcat=Nz([forms]![pid].[picname],[pim].[pimid]) AND pid.pidmonthyy=NZ([forms]![pid].[picdm],[pid].[pidmonthyy])) ORDER BY pid.pidname, pid.pidtype, pid.pidmonthyy
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: eghtebas {http:#9610124}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

stevbe
EE Cleanup Volunteer