Solved

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

Posted on 2003-10-23
5
227 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 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 500 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
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…

740 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