Run-Time Error 2486 - Can't Carry Out Operation at Present Time 
Author Message
 Run-Time Error 2486 - Can't Carry Out Operation at Present Time

Hi, I'm trying to open an access report for VB to make some modifications to
it, however I'm getting error 2486. Does anyone know what this error means
and what I can do to resolve it, the code works fine in Access VBA but not
VB (and yes I have got the correct project references). The code casuing me
trouble is below

    Dim rpt As Report
    DoCmd.OpenReport ("Report by User"), acViewPreview

It crashes on the DoCmd line. Any Ideas?
Cheers,
dave.



Sun, 19 Sep 2004 19:01:49 GMT  
 Run-Time Error 2486 - Can't Carry Out Operation at Present Time
VB doesn't have the DoCmd Object like Access.

If you automate Access (as an automation server), then I think you need to
fully qualify it like:

    Dim rpt As Access.Report
    Access.DoCmd.OpenReport ...

HTH
Van T. Dinh


Quote:
> Hi, I'm trying to open an access report for VB to make some modifications
to
> it, however I'm getting error 2486. Does anyone know what this error means
> and what I can do to resolve it, the code works fine in Access VBA but not
> VB (and yes I have got the correct project references). The code casuing
me
> trouble is below

>     Dim rpt As Report
>     DoCmd.OpenReport ("Report by User"), acViewPreview

> It crashes on the DoCmd line. Any Ideas?
> Cheers,
> dave.



Sun, 19 Sep 2004 23:43:48 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Strange error msg 2486 -- you can't carry out this action at the present time

2. Strange error msg 2486 -- you can't carry out this action at the present time

3. Strange error msg 2486 -- you can't carry out this action at the present time

4. Strange error msg 2486 -- you can't carry out this action at the present time

5. Strange error msg 2486 -- you can't carry out this action at the present time

6. access error # 2486 - You can't carry out this action at the present time

7. HELP ASAP: Run-time error 2486 Access2000

8. Run-Time Error 2486

9. Run-Time error 2486

10. Run-time Error number 2486

11. Run time error '2486' - DESPERATE NEED OF EXPLINATION

12. Run-time error '-2147417846 (8001010a)': Automation error (error 440)

 

 
Powered by phpBB® Forum Software