Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form closing unwanted message box. 1

Status
Not open for further replies.

acamusc

Technical User
Apr 7, 2003
21
0
0
Hi guys:
From the date I begin to work with Access 2002 I am having problem I did never have in Access 97.
Today I have the following problem:
I have an info screen (no writing, no deleting, just watching)
I have two cascade combo boxes and a subform.
I use in my second combo a filtered query (Forms!Presentform!Combo1).
It works great, not problem at all, I can use it very well.
Problem !!!! When I close the form with a command button it shows me a message box asking for the parameter value, backed with half of screen with the current form and the other half with the database windows. If I close with the Close button, X on the upper right corner, no problem.
Can any body help me and explain what is going on?
This is the second form in which I have the same problem. I am complete new for Access 2002 (Office Pro 2002 XP), with 6 years experience with Access 97.
Thank in advance for your help.
acamusc
 
asking for what parameter value. That is the key!

rollie
 
Hi Rolliee:
Thank you very much for your answer but unhappily in none of the two forms in which I have the problem I don't give or ask for any parameter and the message don't give me any clue.
Why it works with system close very well but it doesn't with the button command.
cordially,
acamusc
 
Rolliee, excuse me for the delay but my health was disturbing me and I was away of my PC.
The message you ask me is the following:

" ENTER PARAMETER VALUE (not in english, prox. translation)
" Forms!FRmHistory!Clas
" (Blank text box to receive the parameter)
" OK - Cancel

This happens after I have inquired many times, without closing the forms, so I have used that parameter many times with differents values, with no problems at all and with a very good response. That parameter corresponds to the filter I placed in the second cascade combo box(RowSource) with the value of the first combo box.
Just once I try to close the form I have the parameter problem. As I said first, if I close the form with close icon on the upper right corner no rpoblem at all.
I you have any clue, pls let me know, thanks for your kind support.
acamusc
 
Don't know why there's a difference between 97 and xp, but I'm guessing that some code in the close button causes the second combo (the one having a criteria) to requery, giving this parameter box.

One way to check that, would be to set a breakpoint in the close code (F9), go back to the form, and hit the close button. You can then step thru the code line by line (F8) and see if it performs anything that fires other events.

That said, there might be other reasons too, one of them being form corruption. But do try to tweak a little before doing any drastic measures (and use a backup;-)).

One thing, you might try to set the rowsource of the offending combo to vbNullString in the start of the close buttons code, and see if that helps (just remember to reset it on the forms load again).

Roy-Vidar
 
acamusc,

When it asks for a parameter value, that says you have a field in the SQL statement that is not being satisfied. Look for a mistake in your code. It will be a slight mis-spelling.

rollie@bwsys.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top