[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2003-10-23
5
Medium Priority
?
263 Views
Last Modified: 2010-05-18
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
0
Comment
Question by:maxlint
  • 2
  • 2
4 Comments
 
LVL 39

Expert Comment

by:stevbe
ID: 9609401
Hi Max,

What is the code in the Form_Close event?

Steve
0
 
LVL 34

Accepted Solution

by:
Mike Eghtebas earned 2000 total points
ID: 9610113
Try:

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
0
 
LVL 34

Expert Comment

by:Mike Eghtebas
ID: 9610124
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
0
 
LVL 39

Expert Comment

by:stevbe
ID: 9991071
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
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question