473,387 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

MS Access 2010 VBA Code not compling/executing

I've seen a lot of similar comments on this problem on various forums and most threads end with no resolution but I suspect the answer is simple enough though I've yet to find it.

I can add any given code and when I know it's OK it executes fine. The problem shows when apparently the code will execute up to some point but then stops with no complier or runtime errors.

So I deliberately create an error by mis-referencing a member of a recordset. For example;

debug.print rstMyRecordSet!RecordID

This runs OK but if I sabotage it i.e.

debug.print rstMyRecordSet!RecordIDxxxxx

I compile and run it and with trapping I know I’m executing right up to this statement, but I get no error and nothing executes thereafter.

I’m in a trusted location, tried every complier setting I can see but still no luck. Any ideas?
Feb 14 '11 #1
2 2804
TheSmileyCoder
2,322 Expert Mod 2GB
I dont have access 2010, so I will be shooting with a blindfold on.

Have your tried adding an error handler? Maybe there is some setting in access 2010 related to error handling that I don't know about.

An example would be:


Expand|Select|Wrap|Line Numbers
  1. On Error goto err_handler
  2.   Debug.Print rstMyRecordSet!RecordIDxxxxx
  3. Exit Sub
  4.  
  5.  
  6. err_handler:
  7.   Msgbox "An Error [" & err.Number & "] has occured" & vbnewline & Err.Description
  8.  
Id suggest you start by trying this and then we can move forward from that. Let us know if the messagebox appears.
Feb 14 '11 #2
Lysander
344 Expert 100+
I too don't have Access 2010 but I assume you can still put a breakpoint in your code (at a step you know works) and then use F8 to single step through the code until you come across the line that gives the problem.
Feb 14 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Sergio del Amo | last post by:
Hi, I implemented a Web-Site based in remote scripting with hidden frames. I am using Javascript to provide dynamic functionality. In the machine's local server works perfectly but when i uploaded...
1
by: Tom Dauria | last post by:
I have a form that allows the user to select some number of People from a list. The user can select one or all of the people in the list. The list has thousands of names. Once the user makes...
1
by: Mike Ridley | last post by:
I have just inherited an Access Booking Application. Works fine, including some quite complex code that calculates an availability table from dates input by the user. I have produced a simple...
26
by: jamesbeswick | last post by:
I've been using Access since version 97 and I've migrated to 2003. I've noticed a substantial number of strange ActiveX/OLE and code corruption problems when writing databases. The only solution...
0
by: pvssvikas | last post by:
Good Afternoon, I'am badly in need of help. My task :--- I would like to create a node set of elements through C++ code while executing a style sheet and process the created node set. Node...
0
by: JFKJr | last post by:
I have an excel file, which has columns C and D grouped together, I am trying to delete blank columns and rows from the excel file, ungroup the columns and import the file to MS Access using Access...
1
by: phill86 | last post by:
Hi, I have an access 2010 database that I want to convert to an SQL Server database and I need to know if the data macros in access will still work in the SQL database or will i have to create...
5
by: jaad | last post by:
Hello, I have a database that was written in access 2007 on my pc. I wanted to work off site with the database so I uploaded it onto my laptop which is loaded with access 2010 beta. When I...
2
by: sierra7 | last post by:
It seems Access 2010 is associating an 'input mask' or field type with a combo box when a form is opened, even though there is no Format setting on the control. I have a form which has been...
2
by: dougancil | last post by:
I have a user who had deleted some records from a database today using Access 2010. They have an ID field that's autonumbered. They have No Duplicates allowed. When they created a new record today,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.