Query Window in Multi-user

  • Thread starter Thread starter dhstein
  • Start date Start date
D

dhstein

I asked this question once before, but I still don't have what I need. I
have a query that is executed through an event via a button on a form. This
works both in single user mode and in multi-user mode. I understand that I
need to provide a better user interface and not display the query directly.
I'm still puzzling through exactly how to do that. But for now, I'd like the
user to be able to close the query after the information has displayed. On
my stand-alone version, I can right click the tab and close, but on the
multi-user version this can't be done. This is Access 2007 BTW. So the
immediate question is, is there some way to allow the user to close the
query? I suppose I could provide a button to do that, but that's not a good
solution for now. So is there another way? Thanks for any help you can
provide.
 
It would be best if you used a form to display the results of the query, from
there you can create any buttons for the user including a close button.
 
Carrie,

Thanks for your response. How do you use a form to create the results of
a query ?
 
You create a Form with the Query as its RecordSource. You can display one
Record at a time (Single Form View) or multiple Records at a time
(Continuous Forms View). There is a Form Wizard, installed with Access by
default, that will assist you in creating some Forms. When you open the
Form, data is retrieved from its RecordSource and displayed in the Controls
on the Form.

Larry Linson
Microsoft Office Access MVP
 
Thanks Larry. Right now I have code like this:

Private Sub btnTheCommand_Click()
DoCmd.Close acQuery, "qryTheQuery"
DoCmd.OpenQuery "qryTheQuery"
End Sub

So I guess I need this instead:

Private Sub btnTheCommand_Click()
DoCmd.Close acForm, "frmTheForm"
DoCmd.OpenForm "frmTheForm"
End Sub
 
Back
Top