1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access 2007 form problem...

Discussion in 'Business Applications' started by yeenkuek30, Nov 26, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. yeenkuek30

    yeenkuek30 Thread Starter

    Joined:
    Nov 26, 2008
    Messages:
    2
    hi i created a simple form with typical text field and an image (which i hope will change accordingly to the id). it works okay till i added:

    Private Sub Form_Current()
    End Sub

    in VBA, and this is the popup error i get:

    "the expression on current u entered as the event property setting produced the following error: a problem occured while microsoft aoffice access was communicating with the OLE server or activex control."

    with further explanation:
    "This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[Field], this error occurs because Access expects a macro or event name to run when the event is fired."

    but i cant figure out how to solve.

    while my intention is to set something like this:

    Private Sub Form_Current()
    Me.ImgCtrl.Picture = "C:\images\" + Me.specialid + ".jpg"
    End Sub

    If i remove the oncurrent, everything works okay except the image part.

    pls helppppppppppp...
     
  2. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
  3. yeenkuek30

    yeenkuek30 Thread Starter

    Joined:
    Nov 26, 2008
    Messages:
    2
    hi OBP,

    nice to c your reply. i read thru the post and know tat u have helped a lot of ppl with your experience.

    even without the image itself in the form, the error i msg remains the same and i start to wonder if it's got something to do with the setting??

    ps: i followed everything suggested in your previous posts n it still doenst work out. :-( i know it's weird cuz got stuck even to hav
    Private Sub Form_Current()
    End Sub

    working in my VB.
     
  4. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    This may be an Access 2007/Access 2003 VBA problem. Try Compacting & repairing it.
    If that doesn't help try Converting the database to Access 2003 format.
    If that still has the problem I would suggest that you create a Blank Access 2003 and Import everything from the Converted one in to it and try that.
    If that doesn't work either, remove any "Personal" data from the New Access 2003 version, Compact & Repair it, Zip it and post it on here.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/773229