Form runs query but form remains open

R

Rob

Hi,

I have a simple form that takes a date and on clicking the OK button passes
this to a query which is then run (the button simply opens the query).

1. I'd like to either close the form immediately the query has run or;

2. leave the query open and if the date is charged on the form and the OK
button clicked, the query is run again as opposed to simply taking focus.

Any thoughts? Rob
 
T

tina

generally speaking, it's not a good idea to allow the user direct access to
a query. once the open query object has the focus, you have very little
control over what happens from that point. (this same reasoning applies to
not allowing users direct access to tables.)

suggest you consider binding your query to a form, perhaps DatasheetView to
mimic the layout of a query, where you'll have full control of the user's
interaction with the data.

hth
 
R

Rob

Tina,

Sorry, don't think I explained myself properly the query opens in a
Datasheet set to Read Only. What I want to do is either close the form
after it has opened the Datasheet view or what would be nice; is that the
Datasheet remains open as does the form and when the date on the form is
charged and the OK button clicked, the Datasheet is refreshed.

Regards, Rob
 
Top