Results 1 to 3 of 3

Thread: VBA vs Macro

  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA vs Macro

    I have the following code in the AfterUpdate event in a modal form. The code runs fine in VBA, but if I try putting the code in a macro with the Requery action I get an error 2950. Is there some reason I can not use the Requery action to update a different form? Or, am I referencing the subform container incorrectly in the macro argument?

    Private Sub Form_AfterUpdate()
    Forms![frmEquipment]![sfrmMeasurement].Form.Requery
    End Sub

    Macro
    Action: Requery
    Arguments: Forms![frmEquipment]![sfrmMeasurement].Form

    Any help is greatly appreciated...

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts
    I don't really know enough about macros, but I'd try taking out the .Form in the macro argument. I'm not saying it's wrong (what you have looks right), I'm just saying maybe a macro doesn't handle it.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Star Lounger
    Join Date
    Mar 2011
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I had similar error with you, it is access 2010.
    I stayed with VBA instead.

Posting Permissions

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