Parameter Value Issue

abbaddon223

Registered User.
Local time
Today, 11:04
Joined
Mar 13, 2010
Messages
162
Hi all,

Basically a bit of sloppy development has landed me in a bad spot :(

I have a combo box pointed at a select query, which in turn links to a URN on a form. Long and short is that subject to user navigation, said form is not always open.

When it's not open, and the user tried to use the combo, I get a parameter value issue.

I can get round this by add an OR criteria to the query directing to where it needs to look when the form that's creating the issue is open, but not before I get the Parameter warning first, which I don't want people to see.

Is there a way for me to stop this coming up - such as a "Disable Parametore Value Warning" option?

Thanks for any help. :banghead:
 
1. To Avoid Warnings, If you put your query in a Macro and before OpenQuery, you put Action: SetWarnings, Warning On: NO

2. Maybe you can change query to not use that form parameter. Since if that form not open, it means you do not need that forms parameter really. That forms parameter should be stored in a table. And your query should use ( not form!parameter) but simply a value from that table.
 
Hi, thanks for that. The macro is a non starter as it still prompts for the parameter value.

There is a URN which relates to what the query is looking up in the form (stored in the form). The query can't look at the table as it would relate the URN to the first in the list rather than the specific URN in the customer record. This is why I'm after a way to disable the parameter value rather than change the develoment. Thanks for the help though ; - )
 
Why not check if the form is opened (Loaded) in the first place if open run the query else just do something else... try the following code.
Code:
If CurrentProject.AllForms("[COLOR=Blue]yourFormName[/COLOR]").IsLoaded Then 
    ' [COLOR=Green]Run your Query.[/COLOR]
Else
    MsgBox("Dude the form is not open")
End If
Blue bit needs to change
 
I see where you are coming from, but I don't think that will help. The reaso being is that:

Combo is in a subform. Combo control source is a table. Combo points back to table - table points at query, query points at lookup table. I know it seems a long way round, but take my word for it's required that way due to what is being captured and how.

Can I take it there is no other way to disable or automatically tick OK to a parametoer value warning then?

Thanks again for the support
 
Ah.. okay.. ther is a method to find if the subform is loaded.. check out this link maybe a start... I would not give up very soon.. just give it a little time.. Access experts will be online in a few minutes.. they will be able to help you better..
 

Users who are viewing this thread

Back
Top Bottom