Results 1 to 6 of 6
  1. #1
    Trisha is offline Novice
    Windows XP Access 2000
    Join Date
    Feb 2014
    Posts
    8

    Error with macro while opening access.

    Dear,

    I am facing a strange error in MS access due to one macro while opening one form.

    But the error in only showing in my machine. In my colleagues machines the form is opening without any error.

    "expression after SHIFT input parameter as the event property is a erreur.L 'object or class does not support the set of events.



    *the result of the expression is the name of a macro, the name of a defined function or not In User Event procedure.


    *an error may have occurred during the evaluation of a function, an event or a macro"

    Above is the english translation of the below error message.

    Click image for larger version. 

Name:	011.png 
Views:	13 
Size:	53.1 KB 
ID:	15614

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Do you have any *bogus* MISSING References?

  3. #3
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    What happens if you try to open the form without using the macro? Do you still get the error?

    If you do get the error, check the values for the Event properties on the form. It's only a guess, but is Après MAJ the name of something in your database? If so, the blank in the name may be causing the problem. To may knowledge, there is no event called After Shift or On Shift in Aceess 2000.

    John

  4. #4
    Trisha is offline Novice
    Windows XP Access 2000
    Join Date
    Feb 2014
    Posts
    8
    Dear John_G,

    The form is opening without any error message.
    In the form there is a field named Reference (Text) comimg from a table.
    On selecting a reference value the form get populated with the data related to the reference.

    But during selecting the reference in the field I get the error message.


    The macro code for fetching the record set of the selected reference is:

    Private Sub Modifiable20_AfterUpdate()
    Dim rs As Object
    Set rs =Me.Recordset.Clone
    rs.FindFirst "[Reference] = ' " & Me![Modifiable20] & " ' "
    If Not rs.EOF then Me.Bookmark = rs.Bookmark
    End Sub

  5. #5
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    I think your error is here:

    Your code line Set rs =Me.Recordset.Clone

    should read

    Set rs =Me.RecordsetClone (no period after recordset)

    John


  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    To add to John's post: Recordset.Clone is an ADODB method and RecordsetClone is a DAO property. Good catch John!

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

Similar Threads

  1. opening access from vb 6.0 - command line error
    By john1951 in forum Programming
    Replies: 1
    Last Post: 03-20-2013, 06:42 AM
  2. Replies: 2
    Last Post: 02-13-2013, 04:09 PM
  3. Macro Error - Access Stops Responding
    By chris.williams in forum Programming
    Replies: 2
    Last Post: 10-22-2012, 12:18 PM
  4. Replies: 4
    Last Post: 07-06-2012, 07:46 AM
  5. Error opening Outlook from Access
    By Toots in forum Programming
    Replies: 2
    Last Post: 03-13-2011, 06:00 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