How to OPEN and RUN an Access report ina ASP?

Results 1 to 2 of 2

Thread: How to OPEN and RUN an Access report ina ASP?

  1. #1 Guest

    Default How to OPEN and RUN an Access report ina ASP?

    I am very new to ASP, while I have few years of Access experience. I am in the process of putting our production Access97 DB on the intranet, to enable various users from branches to run canned reports off the intranet and also view output from queries.<BR><BR>What are the commands in ASP to OPEN and run a report in an Access db, the equivalent of DoCmd.OpenReport "ReportName", acviewPreview? I am attaching the code I am trying to run, and the fail message I get.<BR> I also setup a macro and tried to run it with the same results! Can I run an access Macro from ASP? If yes, what is the code?<BR><BR>What am I doing wrong? (Please note that I am using "DSN=BRS" ODBC connection, copied from other working queries).<BR><BR>I will be grateful if you can point me in the right direction. Any suggestions for a good book for a beginner will be greatly appreciated. Thanks a ton.<BR><BR>Regards,<BR>Vijay<BR>vkrishnan@kbhomes .com<BR><BR>The ASP code that fails:<BR>&#060;HTML&#062;<BR>&#060;HEAD&#062;<BR> &#060;META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=windows-1252"&#062;<BR>&#060;TITLE&#062;RateOne Loans In Proces&#060;/TITLE&#062;<BR>&#060;/HEAD&#062;<BR>&#060;BODY&#062;<BR>&#060;%<BR>Sessi on.timeout = 20<BR>If IsObject(Session("BRS_conn")) Then<BR> Set conn = Session("BRS_conn")<BR> Else<BR> Set conn = Server.CreateObject("ADODB.Connection")<BR> "BRS","",""<BR> Set Session("BRS_conn") = conn<BR>End If<BR>%&#062;<BR>&#060;%<BR> set objAccess=createobject("Access.application")<BR>ob jAccess.Visible=False <BR>&#039objAccess.OpenCurrentDatabase "c:inetpubwwwrootwebbrs.mdb", true <BR>&#039objAccess.DoCmd.RunMacro "Rpt1"<BR>objAccess.DoCmd.OpenReport "ClosedbyCounselor", acViewPreview <BR>objAccess.CloseCurrentDatabase <BR>set objAccess=Nothing<BR><BR>%&#062;<BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;<BR><BR>FAIL Message:<BR><BR>RateOne Loans In ProcesMSAccess error &#039 800a09b6&#039 <BR>You can&#039t carry out this action at the present time.@You tried to run a macro or <BR>used the DoCmd object in Visual Basic to carry out an action. However, Microsoft <BR>Access is performing another activity that prevents this action from being <BR>carried out now. For example, no actions on a form can be carried out while <BR>Microsoft Access is repainting a control or calculating an expression.@Carry out <BR>the action later.@1@@1 <BR>/wbrs/runrep1.asp, line 22 <BR>

  2. #2
    Richard Rene Guest

    Default RE: How to OPEN and RUN an Access report ina ASP?

    I am getting the same message and need help on it. If you find a workaround would you please let me know??<BR><BR><BR><BR>& if I can in the future I&#039d return a similar favor<BR><BR>Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts