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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replicate 'group by' in continuous subform?

Status
Not open for further replies.

KanedNUnable

Technical User
Jul 16, 2006
4
GB
Hi all,

I am looking to try and replicate the 'group by' functionality of reports in a continuous subform - without much success so far it has to be said...

The main form is a single form containing customers.
The subform is a continuous form containing reservations.
They are linked by one customer to many reservations on CustID.
Each reservation can have one or more rooms, also linked by one reservation to many rooms on ResID, so the subform will display a record for each room within a reservation.

To simulate the grouping, what I'm trying to achieve is to group the records by date. So if three records in a row all belong to the one reservation, I only want to see the date displayed next to the first record and nothing next to records 2 and 3.

Is it possible then to hide a control (in this case txtDate) based on the value of the control above it, either on the load or requery after filter of continuous forms?

Or alternatively is there another way to achieve a similar 'grouping' effect?

Many thanks!
Kaned
 
Kaned, are you sure Reservations AND Rooms are BOTH continuous?
Access does not allow a contiuous form within a continuous
form?
So, my point is, if Reservations is singular,
you can use an unbound calculated field, with a controlsource
like
=DMax("txtDate","tblRooms","ResID =" & [ResID])

PS, if it's not singular, I believe the function I gave you
will give the Max value for the Reservation record that has the focus, and repeat same date thruu all visible records.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top