Solved

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

Posted on 2003-10-23
5
237 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

705 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