Form/Query Assistance

G

GregInOz

I have a query that is dependent on a date range and a AccountId to run.

I have created a small form DateRange with unbound fields StartDate,
EndDate, ActID (combo box).

From the main form Accounts i have a command button opening DateRange and
then i enter the relevant data and hit enter which opens the query and all
this works perfectly

I'd like to make the process a little simpler for the users by them only
having to enter the date range and somehow use the ActID of the record they
currently have on screen as opposed to selecting the ActId from the combo box.

Thank you in advance for any assistance.

GregInOz
 
T

tina

if the Accounts form is set to Single Form view or Continuous Forms view,
suggest you put those unbound textbox controls in the form Header or Footer
section. instead of using your command button to open another form, use it
to open the query (though i'd advise against exposing a query directly to a
user; better to bind the query to a form of its' own, where you have more
control over how, or whether, the user interacts with the data). set the
query criteria to reference the date-range textboxes and the ID field
directly from the Accounts form.

or, if you really want to use the DateRange form that you built, just remove
the combo box control from it. again, in the query, set the criteria to
reference the ID field in the Accounts form.

hth
 
G

GregInOz

Thanks Tina, it works a treat.

tina said:
if the Accounts form is set to Single Form view or Continuous Forms view,
suggest you put those unbound textbox controls in the form Header or Footer
section. instead of using your command button to open another form, use it
to open the query (though i'd advise against exposing a query directly to a
user; better to bind the query to a form of its' own, where you have more
control over how, or whether, the user interacts with the data). set the
query criteria to reference the date-range textboxes and the ID field
directly from the Accounts form.

or, if you really want to use the DateRange form that you built, just remove
the combo box control from it. again, in the query, set the criteria to
reference the ID field in the Accounts form.

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top