Unwanted parameter value pop-up

gblack

Registered User.
Local time
Today, 18:58
Joined
Sep 18, 2002
Messages
632
I don’t really know what is going on here.

I am trying to open a form and now it keeps asking me for a parameter value:
Service.[Service_ID]. The thing is I have no idea where, in the code, Access is looking for this value.

It seems to be doing this prior to the onset of my form load… before any form events happen (e.g., when I walk through the code, the parameter popup appears before any of these events are kicked off: Open → Load → Resize → Activate → Current). Prior to any these aformentioned events kicking off, I make attempts to open a form like so:
Code:
DoCmd.OpenForm "00160_Clone_Service_Level_Contacts", acNormal, , , acFormAdd, , strArgs

As soon as I step through the DoCmd.OpenForm line, a message box pops up asking for the parameter value, shown previously: Service.[Service_ID].
So, it’s looking for Service_ID from the service table, but the form is unbound. So when does it check for this value? And how can I stop it from doing this?
 
Last edited:
check to see if you have a reference to it in the underlying query of the form you are trying to open (either as a field which now no longer exists, in a calculation which exists there, or as a parameter).

And, if that form you are opening contains subforms, check there because subforms load before main forms open.

Also, what is being passed to strArgs?
 
Last edited:
Thanks for looking at this Bob,
Sorry it took me a while to get back. I honestly don't know what is going on here. The form I am trying to pull up is a popup form that's used to filter out data from a table. the retrieve contact information based on the filtered search.

There are two trypes of Contact data (i.e., Agreement and Service).

The strArgs value passes two peieces of concatinated data first a single characters (either "A" or "S") based on the contact type and then an integer value which I pull from the string and convert.

If the value contact type is "A" then the integer value coincides with an Agreement_ID if the contact type is "S", then the integer value equates to a Service_ID.

But for some reason... before the form is even open, Access is looking for a Servcie_ID from the service table.

As far as I can tell, there are no underlying queries to wit this form is bound (it is unbound) and there are no subforms. My issue is that I once had this set to only pull Service_ID information and now I just added the Agreement functionality... but I can't find anywhere in the code that Access would be looking for that.

In fact when I walk through in debug mode the pop-up paramater appears imediately after the afroementioned/posted code and before any of the form events fire... so I have no idea why it's lookiing for this or where to look in the code for this... very perplexing.

Thanks again for your attention,
Gary
 
I think i just resolved the issue... I did a repair & compact and that seemed to do the trick. I suppose Access was looking at code I couldn't see or something... Anyway, that worked for me... not the form is pulling up just fine, without prompting me to put in a Service_ID value.

Can anyone explain what might have been happening there specifically? I mean why would repair and compact resolve the issue? Can access remember code after it has been written over or deleted?
 
Sometimes the VBA and the compiled VBA get out of synch. Sometimes that requires a decompile. It would appear in your case that it just needed to be compiled again.
 

Users who are viewing this thread

Back
Top Bottom