making a particular query the activedatasheet

  • Thread starter Thread starter richardconers
  • Start date Start date
R

richardconers

If there are several queries that are open, and code is running from a
clicking a command button in a form, what code will make the
already-open query with the name "MyQuery" to be the activedatasheet as
in
msgbox screen.activedatasheet.currentrecord
so that I know what number record the cursor is on in MyQuery?

Thank you!
 
Hi,
i think docmd.OpenQuery "MyQuery",acViewNormal will make your query window
active
 
Queries and tables don't give you enough power to manipulate them as the
interface.

Instead, create a form, and you can do what you like with it. The form can
be in datasheet view if you want to see it that way.

Then you can do things like:
Forms("Form1").SetFocus
 
Back
Top