The OpenForm action was cancelled...just from a minor query change?

RSW

Registered User.
Local time
Today, 09:45
Joined
May 9, 2006
Messages
178
I inherited a database that was working fine, except one field was showing LocationID instead of the Location text.

So, I added the already-existing Location lookup table to the query, saved, changed the field on the form, switched to Form Mode and took a look, everything looked fine.

The problem is that, on subsequent attempts to open the form, I get errors. When I start from the switchboard in form mode, I get "The OpenForm action was cancelled". When I try from design mode, I get errors regarding OnOpen and OnError.

There doesn't seem to be anything in the VBA specific to the exact query or field.

When I switch things back to the way they were...it works again!

I don't understand how a minor change to the query is having this effect. Is there anywhere else that some reference to the original query/field might be hidden, that could be causing this problem??

I'll be happy to provide any other information that is needed.

Thanks in advance!
 
Are there any subforms that may use the Control ?

Check any Command Buttons that may also have a reference to that control.

Check how the form is opened in the Menu. Is it opened as New Data?

Is the Control Bound or Unbound.

Does the form use a Query as it's record source? rather then a SQL string in the properties?
Check the query to see if it returns the data you expect. if an SQL String, copy and paste into a query and run the sql to see if it returns the expected data.

If not, then the problem is your records source sql/query.
If you get the expected data, then the problem appears to be in the form.

Trust this assists.
 
If the code in the OnError and OnOpen events is not too long, can we see it?

Is this a multi user database?
 
open the form directly, not through the menu. or even try the underlying query. there is probably an error in there somewhere.
 
Hi everyone,

Thanks so much for your prompt responses. I had a personal issue come up and was unable to get back to this. I'm going to try your suggestions tonight; I'll keep you all posted :) Thanks again.
 

Users who are viewing this thread

Back
Top Bottom