Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9237155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:28:16+00:00 2026-06-18T07:28:16+00:00

i have a question about access 2000 or 2003 , i need to make

  • 0

i have a question about access 2000 or 2003 , i need to make a macro that opens the form and automatically clicks a button that runs a query , how can i do this, may some example can help me to do this ? any suggestions ? my idea is to run something like this:

Sub Refreshfiledata()
m  = MsgBox("Are you sure you want to run this macro ?.", vbYesNo)
If m = 6 Then
Application.DisplayAlerts = False
    SendKeys "{Enter}"
     Application.DisplayAlerts = True
      MsgBox "Done"
  End If
 End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:28:17+00:00Added an answer on June 18, 2026 at 7:28 am

    Sendkeys is almost never a solution to anything.

    You could put something like this in a module:

    Sub OpenAForm()
        DoCmd.OpenForm "Form1"
        Forms!Form1.cmdClick_Click
    End Sub
    

    Which would refer to this code on form1, note that the word Private that Access usually adds before Sub has been deleted:

    Sub cmdClick_Click()
        ''For a query to display data
        DoCmd.OpenQuery "Query1"
        ''For a query to change data
        CurrentDB.Execute "Query1", dbFailOnError
    End Sub
    

    You would have to alter the code to suit your set-up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question about access to object properties that will be used in
I have a question about Access.If for example I have a table with the
I have a question about how to access the member with the same name
I have a question about HTML. I know that there is this mechanism that
I have a question about why I can access certain pieces of memory, and
I have a question about html form fields. I'm trying to create a form
I have a question about RAD & WAS Spring MVC development. So that we
i have a little question about getting access to a method in another controller,
I have a question about custom authorization in MVC. I have a site that
I have a question about sync requests. Background: I need to get the userID

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.