Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Form which prompts for start and end dates

Status
Not open for further replies.

mtimbol

Technical User
Jan 14, 2001
4
PH
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 a main 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 from the transactions table depending on what the user needs.

I wanted the form to prompt the user for the
beginning date and ending date of this period every time it is opened so Access will only get the transactions within these dates.

so what I did was..

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

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
 
Try creatinfg a seperate form [F_Date] with two unbound boxes. Call the first "Start Date" and the second "End Date". Then point the criteria of your queries to the form as follows:-

Between [Forms]![F_Dates]![Start Date] and
[Forms]![F_Dates]![End Date].

If you create F_Date as a pop-up form then you can keep it open until you close your main form. Remember that F_Date must be open to run the main form.
 

wow!!! it works just the way I need it to

thanks man!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top