Results 1 to 7 of 7
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    I would like to know what runcommand function to use for this old line of code:

    DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [quote name='patt' post='777222' date='28-May-2009 02:06']I would like to know what runcommand function to use for this old line of code:

    DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70[/quote]
    It's

    RunCommand acCmdRefresh

    See Converting DoMenuItem to RunCommand.

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    [quote name='HansV' post='777225' date='28-May-2009 11:09']It's

    RunCommand acCmdRefresh

    See Converting DoMenuItem to RunCommand.[/quote]
    Thanks Hans, I had found out but it's good to know that link.

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    [quote name='HansV' post='777225' date='28-May-2009 11:09']It's

    RunCommand acCmdRefresh

    See Converting DoMenuItem to RunCommand.[/quote]
    By the way, what does this command do?

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    It is the equivalent of the Records | Refresh menu item. From the built-in help for Refresh or requery data:
    If you are using a Microsoft Access project, or a Microsoft Access database that's shared on a network, other users could be changing data while you are viewing the same data in a datasheet or form. Microsoft Access updates the data you see at regular intervals. However, you can immediately display the most current data by refreshing the records.

    In an Access database (.mdb), refreshing records only updates the data that already exists in your datasheet or form. It doesn't reorder records, display new records, or remove deleted records and records that no longer meet specified criteria. To perform those tasks, requery the records.

  6. #6
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    [quote name='HansV' post='782261' date='29-Jun-2009 16:42']It is the equivalent of the Records | Refresh menu item. From the built-in help for Refresh or requery data:[/quote]
    Thank you

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    On a form, you can also use

    Me.Refresh

    instead of

    RunCommand acCmdRefresh

Posting Permissions

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