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!

Grouping in Access Forms

Status
Not open for further replies.

rayp0614

Programmer
Feb 15, 2002
5
US
I have a form and subform in my database. Users enter data in the subform in a sequential manner. If a user wanted to go back and insert a row on the subform to maintain the grouping, what's the best way to approach this?

Example
Category Price
Door1 $
Modification1 $
Door2 $
Modification1 $

I want the user to be able to enter a Modification2 with Door1 and maintain the grouping for the user.

Thanks
RP
 
Making the visual presentation of data match the logical ordering of it usually requires the use of a "sortkey", as I call it. The sort key is designed to FORCE the display of something to be sorted in an unusual or deviant manner.

For example,if you designed a sortkey for your subform's recordset query that took the "D" from Door, the '1' from "Door1" and the "M" from Modification and used that as a sortkey, the new "D1M2" sortkey record would fit in between D1M1 and D2M1..

This would of necessity be a calculated value in your subform's query.

Jim Jim Hare
"Remember, you're unique - just like everonone else"
 
Making the visual presentation of data not to match the logical ordering of it usually requires the use of a "sortkey", as I call it. The sort key is designed to FORCE the display of something to be sorted in an unusual or deviant manner from it's logical way.

What you describe is logically a One-Many grouping, ONE PRODUCT (a DOOR) with 1~n MODIFICATIONS for it.

If you design the correct logical framework for your subform, a simple requery after data is entered in should display your records the way you want them to be displayed.

Otherwise, you have to FORCE the display by sorting on a calculated or derived value that recognizes that Mod 2 for Door 1 comes before Mod 1 of Door 2..

Would it help if I hinted: D1M1, D1M2, D2M1, D2M2....



Jim Hare
"Remember, you're unique - just like everonone else"
 
Thanks Jim. That just gave me the right idea as how to do it.

Thanks again,
Ray
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top