Err.Number value not filled in after DAO call

J

Jim Burke in Novi

I am opening a DAO recordset, then checking the value of err.number, but the
value is not being filled in. In debug mode if I put the cursor over
err.number it doesn' even show a value.
 
C

confumbled

At the start of your code, try

Dim errNo as long, errMsg as String

Then add

errNo = Err.Number: errMsg = Err.Description

in your code.

You can hover over the errNo and errMsg to get a value
 
D

David C. Holley

Please post your code. Using Err.Number in code will always return a
value when the code is executed - even if its 0 (no error).
 
J

Jim Burke in Novi

I have since converted the code to use ADOX and I deleted my old DAO code.
 
D

David C. Holley

So you healed the patient's throbbing pain in the side by shooting him?
(I'm watching lost at the moment)

I would encourage you to go back and try to understand what was going on
with the Error object.
 
Top