Results 1 to 11 of 11
  1. #1
    witooldas is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    13

    Split form event error

    Hi there,
    I have a problem with split form. Form displays information and blow it displays date from the query. Now I want to create a button which will show me simple alert window with VB help.

    Code:
    Sub CommandButton4_Click


    MsgBox "Test"
    End Sub
    When I click button access throw error window, which tells me some thing about OLE server or ActiveX problems.
    What it can be? Thanks.

  2. #2
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Is that a straight copy/paste from your VBA code? If it is I believe your code needs to look as follows:

    Code:
    Private Sub CommandButton4_Click()
    MsgBox "Test"
    End Sub

  3. #3
    witooldas is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    13
    Sorry for that code... Yes, i use Privete Sub

    Quote Originally Posted by jgelpi16 View Post
    Is that a straight copy/paste from your VBA code? If it is I believe your code needs to look as follows:

    Code:
    Private Sub CommandButton4_Click()
    MsgBox "Test"
    End Sub

  4. #4
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    And you are still getting the same error message? Do you have "Option Compare Database" at the top of your VBA code? Try this...

    Code:
    MsgBox "Test", vbOkOnly

  5. #5
    witooldas is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    13
    Hmm... i was trying to do new database... but now i even can't run VB to write code... it tels me that "Microsoft Office Access ar failed to create Visual Basic module"

    Maybe some property variable are set as false or blank?

  6. #6
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Whoa, I'm not sure what is going on now. There may be something wrong with Access itself? What version are you using?

  7. #7
    witooldas is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    13
    hmmm.. Microsoft Office 2007 but what is the version is i don't know where i can look

  8. #8
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    If this happens on every new accdb, I think you need to re-install office since it sounds like something corrupted shared resources (possibly another corrupted type of visual basic installation when installing another program). Either that or there's something you've left out telling us in your posts.

    You can also try creating some vba code in Excel and see if you get the same error. If so, re-install office.

    Did you install office from a cd or from a shared network drive? Did you remove any older office versions or keep them on the computer or did you upsize a previous version? When installing office, were there any components set to run from the cd versus 'my computer'?

  9. #9
    witooldas is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    13
    Hmm.. In excel VBA working perfectly.. I thing problem was in the table. Now I again can create module, but still throwing error with "OLE server or ActiveX problem". When I creating new database with blank form and with VBA help I can throw "Alert", but in mine database I can't. Maybe it because I using "SharePoint" (one of table are in the server).

    O had an experiment, I took that table which in the server and export it like table with records to the database. But it still throw that error with OLE server or ActiveX.


    Quote Originally Posted by pkstormy View Post
    If this happens on every new accdb, I think you need to re-install office since it sounds like something corrupted shared resources (possibly another corrupted type of visual basic installation when installing another program). Either that or there's something you've left out telling us in your posts.

    You can also try creating some vba code in Excel and see if you get the same error. If so, re-install office.

    Did you install office from a cd or from a shared network drive? Did you remove any older office versions or keep them on the computer or did you upsize a previous version? When installing office, were there any components set to run from the cd versus 'my computer'?

  10. #10
    witooldas is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    13
    3 days and 3 nights i was testing form and what i found:
    When i insering objekt's in form all buttons with VB code working perfectly, but when in form design u trying to create "Form name" ir insert "Logo" then all buttuns not working.

    Maybe some one know how to change some property variable, to make it work with logo ?

  11. #11
    witooldas is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    13
    i Solved that problem i then Visual Basic > Tools > Refences i had to select "OLE" And "ActiveX" options

    Thanks

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

Similar Threads

  1. Run-time error on import (Split DB)
    By jgelpi16 in forum Programming
    Replies: 1
    Last Post: 03-15-2011, 06:43 AM
  2. Replies: 1
    Last Post: 02-25-2011, 11:32 AM
  3. Sum Error on Split Form
    By anoob in forum Access
    Replies: 1
    Last Post: 01-21-2011, 03:20 PM
  4. Replies: 12
    Last Post: 06-14-2010, 08:39 PM
  5. combobox.dropdown event not working after error
    By perlyman in forum Programming
    Replies: 1
    Last Post: 04-02-2010, 06:55 PM

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