Solved

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

Posted on 2003-10-23
5
191 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
5 Comments
 
LVL 39

Expert Comment

by:stevbe
Comment Utility
Hi Max,

What is the code in the Form_Close event?

Steve
0
 
LVL 33

Accepted Solution

by:
Mike Eghtebas earned 500 total points
Comment Utility
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 33

Expert Comment

by:Mike Eghtebas
Comment Utility
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
Comment Utility
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now