prompt for inclusive dates on a form

mtimbol

New member
Local time
Today, 11:04
Joined
Dec 27, 2000
Messages
5
Please help me...

I have 2 tables:

1. Company Profile Table
Fields: Company Name, Address, Phone no., etc

2. Transactions Table
Fields: Company, Transaction Date,Transaction Type, Amount, etc.

I need to put this in a Form which contains the fields of the "Company Profile Table"
and has a subform which shows all of the transactions of the company
within inclusive dates. I wanted the form to prompt the user for the
beginning date and ending date of this period every time it is opened.

so what I did was..

..I entered 'Between [Start Date] and [End Date]' in the
underlying query date criteria.

Result: Unfortunately, aside from prompting me every time I open the form, it prompts me
for the start and end dates every time I click the next record button of the main form.
And the sub form only displays the transactions from one date.
You have to move to the next record of the main form to see the records from other dates.

..I also tried doing it differently. I made new queries. I used the Between [start date]
and [end date] of the date criteria of the underlying query of the main form.
I made a subform which is linked to the company name and date of the main form.

Result: It prompts me only when the form is opened but only displays all transactions from
one date on the subform. You have to move to the next record of the main form to see the
records from other dates.

I would appreciate any advice. Thanks.]

MLT
 
I believe that is the way it is supposed to work. When you load the form, you are prompted for the date range. This information goes into your query and the information is filled on your form/subform. Clicking on the next button causes the information to change. The query is being called again therefore your are prompted for the date range again.

If you want to use the same date range I would before you open the form, open another form with two textboxes. Let the user fill in the date there then clck on an Ok command button. this will open the Company Profile form you have. Leave the form requesting the date range open so you will hve access to the date values entered. Each timne you go to a new record the query will pick up the date values from that form and not request the user to enter it again. I am assuming you are using the same date range for all the records in the company profile table.

When you close the company profile form then you close the form requesting the date range
 
I see.

Can you give me details on how I can go about doing this?
 

Users who are viewing this thread

Back
Top Bottom