Link to home
Start Free TrialLog in
Avatar of Bob Collison
Bob CollisonFlag for Canada

asked on

Access Error 2467

Hi Experts,
I am having a problem with Access 2010 displaying Error 2467.  Specifically when Scenario 2 is completed.

I have checked various forums on the internet without success.

I have attached a copy of my application. It compiles without any problem.  I have stripped out most of the code etc. in an attempt to
narrow down possible legitimate causes of the error.  I believe that this is an Access bug.

When the application loads it displays Form {M-41-000].  Click the F-41-010 button (only this and the Close button work)
to display the form with the problem.  You can then try the following two scenarios to see what is happening.
Adding a new record works correctly.

Scenario 1 - Works
- Open form F-41-010] from a previous form (M-41-000] that supplies criteria to restrict the records available.
- Form [F-41-010] works correctly.  i.e. Scrolls through records etc. including allowing changes which are accepted (updated).
- Select Design Mode.  Form displays in Design Mode without Error 2467.
- Note that if data is changed and the record saved there is no error.

Scenario 2 - Error 2467
- Open form F-41-010] from a previous form (M-41-000] that supplies criteria to restrict the records available.
- Make a change to data in the form.  e.g. in the Org Level field.
- Don't save the data, just immediately select Design Mode.
- Error 2467 displays.
- Note that when the error is cleared and the form displays the changed data has been updated.
- Also note that the Calling Form referenced in the Q-41-010 is Open and the lookup query works.

Summary
I believe that what is happening is that Access when switching to Design Mode actually saves the record
but displays an erroneous message.  I also believe that I have only encountered this problem since the last MS Monthly Update in April.

Can you determine whether I am correct or have I some bad code and recommend a solution?

Thanks.
Bob C.
Period-Event-Org-Development.accdb
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

It's in the BeforeUpdate event:

    If Not IsNull(PERIOD_EVENT_GRP_REG_KEY) And PERIOD_EVENT_GRP_REG_KEY <> " " Then

But what's the problem? Just save the record before switching to designview.

Also, you could reduce that code to:

    If Nz(PERIOD_EVENT_GRP_REG_KEY, " ") <> " " Then

/gustav
Avatar of Bob Collison

ASKER

Hi Gustav,

Thanks for the suggestion to simplify the line of code.

Also you have now confirmed that ensuring I save the record first will result in the data being processed correctly and that it appears that if I simply ignore the error the data is also processed correctly.  If this the case then is there really isn't an error and the error shouldn't display at all.

Also I assume that what you are saying is that the problem is that I am referencing the data in field [PERIOD_EVENT_GRP_REG_KEY] that has been previously set via a ComboBox Lookup (the Select Reg. Id.: field) using a Query (Q-41-010 - Event Group Registration Id Lookup).  If this is true I have been doing this for a long time without this error being displayed.  Am I therefore correct that something has recently changed with Access 2010 that now causes this?

Finally is there a method I can use to replace the one I'm using to eliminate the error or stop the displaying of the message?

Thanks.
Bob C.
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Gustav,
Thanks for the information and solutions to for the various scenarios.

I have awarded the points.

Thanks again.
Bob C.
You are welcome!

/gustav