 |
| Access VBA Discuss using VBA for Access programming. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

February 19th, 2004, 02:28 PM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
No rules...when strange things start to happen, it is best to make a copy of the database and then attempt a compact and repair. If that doesn't work, then start checking references, compiling and rebuilding. There are no hard fast rules.
Make sure that you don't manually create event procedure headings. Always let Access do it.
Regards,
Mike
|
|

February 19th, 2004, 02:36 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
It really depends upon which reference / library is missing. The most common are ADO and DAO. - Open a block of code in the VBA editor. This can be a Module or Form or a Report - Forms and Reports require Design View / Code View.
- From the Main Menu select: Tools / References.
At this point you should see a list of the references.
If your references are MISSING, you may need to use and / or install them.
- Use
- Scroll down the reference list until you find the reference.Check off each missing reference. If the reference you need is not on the list, you will need to install it. (See Below)
- IMPORTANT: After all the new references are checked, click on the Ok button.
- Open Tools / References again.
- Verify that the NEW references are listed at the top.
- Install
- Close the VBA editor.
- Close the Form or Report (If opened).
- Close Access
- Install the new library. You may need to download a new MDAC from Microsoft.
- Restart Access
Rand
|
|

February 19th, 2004, 02:55 PM
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks a lot for everything guys!!!
Paul
|
|

March 4th, 2005, 01:33 PM
|
|
Registered User
|
|
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by rgerald
Whenever a particular database form tries to execute any VBA code, I get the following error message:
Quote:
|
quote:The expression XXXXXXX you entered as the event property setting produced the following error: A problem occurred while Microsoft Access was communicating with the OLE server or ActiveX Control.
|
XXXXXXX is the name of the event (After_Update, Before_Update, Form_Load, Current, etc).
This occurs even if the code for the event is something as simple as Me.Refresh. If I reference a function or subroutine, the form behaves as if the function or subroutine doesn't exist. The same error occurs if I try to execute the procedure from the immediate window.
Can this be fixed or should I start over?
Rand
|
Keith Woodard
|
|

March 4th, 2005, 01:34 PM
|
|
Registered User
|
|
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Good Day,
How did you resolve your problem with Access?
Regards,
Quote:
quote:Originally posted by rgerald
Whenever a particular database form tries to execute any VBA code, I get the following error message:
Quote:
|
quote:The expression XXXXXXX you entered as the event property setting produced the following error: A problem occurred while Microsoft Access was communicating with the OLE server or ActiveX Control.
|
XXXXXXX is the name of the event (After_Update, Before_Update, Form_Load, Current, etc).
This occurs even if the code for the event is something as simple as Me.Refresh. If I reference a function or subroutine, the form behaves as if the function or subroutine doesn't exist. The same error occurs if I try to execute the procedure from the immediate window.
Can this be fixed or should I start over?
Rand
|
Keith Woodard
|
|

April 14th, 2008, 07:40 PM
|
|
Registered User
|
|
Join Date: Apr 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
I'm having same error for missing references. I installed the object libraries and checked in Access that it shows the libraries in the references but the error still persists. Do we have to install Access again? or recreate the forms? Am I missing something? Please Advise.
Thanks for help!
Regards,
|
|
 |