list box parameter prompt

  • Thread starter Thread starter Janet
  • Start date Start date
J

Janet

I have a form where the data source is a table with the
key field of siteID. On the form is a listbox that
displays the siteID and networkID with the bound column=1
or siteID. If I navigate between records, the listbox
changes and everything is fine. If I add a record to the
listbox, the form refreshes and everything works fine.

But, everytime I close the form, I get a parameter query
pop-up box that asks for [forms]![frmSites]![siteID].
The only place I use the reference it is for the
listbox's datasource. (Here's the sql: SELECT
dbo_tblSiteNetworks.siteID, dbo_xTblNetwork.networkMethod
FROM dbo_tblSiteNetworks LEFT JOIN dbo_xTblNetwork ON
dbo_tblSiteNetworks.networkMethodID =
dbo_xTblNetwork.networkID
WHERE dbo_tblSiteNetworks.siteID)=[forms]![frmSites]!
[siteID]"

The knowledge base references an incorrect naming scheme,
but I know that's not applicable since navigating is
working properly between records. I only get the prompt
when I close the form.

Any idea what's causing this? I have listboxes on other
forms and there's no problem.
 
I did a compact and repair and now everything seems to be
fine. Seems like I'm having to do this way too much in
Access XP - at least once, sometimes two or three times a
day.

I've installed the latest service packs and fixes.
Anybody else noticing this?

Janet
 
Hi Janet,

Thank you for using MSDN Newsgroup! My name is Billy and it's my pleasure to assist you
with this issue.

First of all, I would like to confirm my understanding of your issue.

From your description, I understand that when you attempted to close the problematic form
with listbox, you would get an "Enter Parameter Value" dialog box ask for the parameter.
However, everything worked fine and other forms with listboxes had no closure problem.
Have I fully understood you? If there is anything I misunderstood, please feel free to let me
know.

However, I'm not sure some of some details on this issue. Please confirm the following
information to narrow down the problem and apply the workarounds to see if it can solve your
problem:

==============
1. The Edition of Operating System you are running

If the operating system is Microsoft Windows XP Professional or Microsoft Windows XP Home
Edition, please verify which desktop theme you are using.
(Right Click Desktop -> Properties -> Themes).

There are known issues that the Parameter Dialog Box will pop up on the Windows XP
computer with the Windows XP theme. To workaround this scenario, please choose
"Windows Classic" Theme and see if the dialog box is suppressed when the form is closed.

===============
2. How the form was closed? Is it closed with some Exit Button running DoCmd.Close, or just
closed by clicking the "X" in the upper right corner of the form window.

I performed a test on my side and found no problem when clicking the "X" in the upper right
corner of the form window, but I hadn't test it with DoCmd.Close. Please have a try to close the
form with that "X" mark to see if the parameter dialog box will be pop up.

If you run DoCmd.Close to close the form, I recommend you first turn the Echo method off and
re-enable it after the Docmd.Close as below: Then, turn it on again.

'''''''''''''''''''
DoCmd.Echo False
DoCmd.Close
DoCmd.Echo True
''''''''''''''''''

If it still cannot solve the problem, it's better to use the SetWarnings action to prevent modal
warnings. For more information, please refer to the Microsoft Access Help.

================
3. If the workarounds above don't make sense, I'd like to accurate reproduce the problem on
my side. To further isolate the problem, please create a new blank Access database and
import the form and other necessary tables and queries from your original database.

Before closing the new database, open the Visual Basic Editor by pressing ALT+F11. On the
Debug menu, click Compile <database name> if it's not grayed out.

If there is any missing reference, click Reference command on the Tools menu to add it. After
you compile the database and confirm there is no compilation error, close and save the
database.

After that, check if you get the same problem with this new database. If you get the same
problem, send this database to < (e-mail address removed) > for further research.

================
4. To better understand the issue; any screenshot which can help us get a more concrete idea
on this problem is greatly appreciated. If you have any questions or concerns on the action
plan here, please don't hesitate to let me know; it's my pleasure to be of assistance.

=================
Janet, please confirm the problem first and apply my suggestions above to see if this helps
resolve your problem.

If they cannot solve your problem, I'd appreciate your patience to collect more information, ZIP
all the information in one file and send it to < (e-mail address removed) > for my reproduce.
Thank you for your efforts!

Season's greetings,

Billy Yao
Microsoft Online Support
 
Back
Top