RunCommand ClearGrid

  • Thread starter Thread starter DavidL
  • Start date Start date
D

DavidL

Why can't RunCommand find ClearGrid when a macro calls
it? ClearGrid shows up in the Command listing of the
macro page and acCmdClearGrid appears in VBE.

Thanks.

Env: Access 2003
ADO and DAO both active
 
Have you got a Grid (DesignView of a Query) selected / being the current
Object?

The ClearGrid command is only available when the Grid is the "current"
Object.

This is not related to DAO or ADO.
 
Thank you.

So what is the best way of clearing filters using Filter
by Form?

I would like to be able to just drag the ClearGrid button
onto my forms but I can't do this in Access 2003 -- not
sure about V12 yet.
 
To remove Filter / Sort, use:

Action: RunCommand
Commmand: RemoveFilterSort

I think you misunderstood the ClearGrid Macro action.
The "Grid" here refers to the QBE (Query-By-Example) grid
that you use when you are designing a Query.

Besides AutoKeys Macro, I haven't written an Access Macro
since 1997. Since A97, Microsoft have been saying that
Access Macros are only available for compatibility and
Macro support may be withdrawn in future Access versions.

If you do any serious work in Access, I would suggest
moving to VBA rather than Macros.

HTH
Van T. Dinh
MVP (Access)
 
This suggestion didn't work for me but thanks anyway. It
gave me a little practice with macros which I haven't
tried since my first Access class.

I will look for a solution in one of the many Access books
that I own.

David
 
Back
Top