Documentation of Access programming RunCommand constants

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
mgump9Asked:
Who is Participating?
 
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
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
 
Jeffrey CoachmanMIS LiasonCommented:
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
 
mgump9Author Commented:
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
 
Jeffrey CoachmanMIS LiasonCommented:
Great!

Glad I could help.

Take care!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.