[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Documentation of Access programming RunCommand constants

Posted on 2005-04-22
5
Medium Priority
?
790 Views
Last Modified: 2012-06-21
Hello,

I am trying to understand an existing Access application so I can make a change to it.  I have the following code:
======================================================================
    DoCmd.SetWarnings False
    DoCmd.RunCommand acCmdAdvancedFilterSort
   
'  Send a command to run a query based on current selection criteria that has been manually set up by user.
   
    SendKeys "qryFilteredRecordSource{Enter}", False
   
    DoCmd.RunCommand acCmdSaveAsQuery
    DoCmd.Close
    DoCmd.SetWarnings True
======================================================================

This somehow causes a query to be created (qryFilteredRecordSource) that selects records based on a form that had some selection criteria entered.  I want to create the query for only the record that is currently being displayed in a form.  I suspect I need to change the "DoCmd.RunCommand acCmdAdvancedFilterSort" statement somehow.  I have not been able to find any documentation on the web that explains the acCmdAdvancedFilterSort argument though so I haven't been able to understand exactly what it does or what I should do to change it to only select the currently displayed record.

I occasionally have to do minor maintenance on Access programs and finding good documentation at Microsoft's web site or elsewhere on the format and arguments of statements seems to be very difficult.  Is there a place that really documents all the parameters used in Access?

I would appreciate help in knowing how to change the code but I would REALLY appreciate suggestions on what resources to use to be able to understand Access code.  I have looked at a number of books on Access and VBA but never found any that has enough information to help me learn how to read and code properly.  It seems that they usually give general information about program type statements but when it gets to the specifics of the arguments there is not enough detail to get the job done.

Thanks for your help.

Mark
0
Comment
Question by:mgump9
  • 3
4 Comments
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 750 total points
ID: 13848860
I don't know if there is any "Documentation" per se, on .RunCommand members.

I would suggest opening up the Visual Basic Editor (Press: Alt-F11)
Then press: F2 (To open the object browser)
Then type: "acCmd" into the "search text" box, and click the "Search" Icon (the icon that looks like binoculars)

It does not give you much help, but it does, a least, give you a list of all the "acCmd*" keywords

Good luck
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 14428438
As the only poster, I did not recieve any feed back that my post DID NOT solve the problem.

Therefore I would presume that I DID solve the problem.

I feel I should be awarded the points
0
 

Author Comment

by:mgump9
ID: 14428594
OK.  I appologize for not responding to boag2000's comments.  They were helpful so I have no problem awarding him the point.

Thanks for you help.

Mark
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 14428923
Great!

Glad I could help.

Take care!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question