Results 1 to 4 of 4
  1. #1
    Bkndbrown is offline Novice
    Windows 8 Access 2013
    Join Date
    Nov 2015
    Posts
    22

    error when trying to open a page

    I am trying to open a report from a form with the current record that is open on the form. The report is called NEOFormR and the common ID is personalID.



    I am using the following code linked to a button

    DoCmd.OpenReport "NeoFormR", acpreview , , "[PersonalID]=" & [PersonalID


    Then when I try and run it I get the following error.

    The expression on click you entered as the event property setting produced the following error: A problem occurred while Microsoft Access was communicating with the OLE server or Active X Control

    I have tried changing my code to the text string form
    DoCmd.OpenReport "NeoFormR", acpreview , , "[PersonalID]='" & [PersonalID & "'"

    Also I tried running this with a simple macro and it would open the report but not to the correct record.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Is the missing closing bracket a typo?
    Code:
    DoCmd.OpenReport "NeoFormR", acpreview , , "[PersonalID]=" & [PersonalID]

  3. #3
    Bkndbrown is offline Novice
    Windows 8 Access 2013
    Join Date
    Nov 2015
    Posts
    22
    Yes it is. I have the closing bracket

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    So it sounds like you are headed down the corruption path.

    I had an Access 2000 dB that gave me an error something like "Lost connection to the dB", but both the FE & BE were on the same computer.
    See this thread (post #2) on how I fixed my dB: https://www.accessforums.net/access/...ect-41760.html


    Make a couple of backups BEFORE you start........

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Open a specific pdf page on Access
    By claudio.labarbera in forum Access
    Replies: 7
    Last Post: 10-20-2015, 08:19 AM
  2. Replies: 1
    Last Post: 12-21-2011, 02:04 PM
  3. Open up url page hyperlink not working!
    By riffraff_ashraf in forum Forms
    Replies: 1
    Last Post: 09-29-2010, 09:33 AM
  4. Replies: 1
    Last Post: 07-07-2010, 11:06 AM
  5. Open a form from a web page
    By Karyn-2000 in forum Programming
    Replies: 0
    Last Post: 04-21-2006, 07:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums