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

Datasheet Expand and Collapse Records 1

Status
Not open for further replies.

jeff5311

Programmer
Mar 1, 2002
31
US
This might be a silly question, but here goes...

When I view data within my tables, due to the relationships I've created, there's a little "+" sign next to each record. Clicking on the "+" enables me to expand and collapse each record to see all the related data.

Does anyone know a way to duplicate this functionality within a form using a datasheet view? On forms, all I get is the generic record selector (looks kinda like ">") which doesn't allow for expanding a collapsing.

As a specific example, each customer can order 1-to-many products. Each product (ex: tshirt) can have 1-to-many options (color, size, etc...) per product. Simple example, and a very common one at that...

I'd like to have a form (orders) and a subform (products), and be able to expand and collapse each product to add the necessary options (creating a form, subform, and another sub-subform clogs up the navigation, and makes the form unwieldy, so I'd certainly prefer the "expand" and "collapse" approach).

Does this make sense? Any help would be greatly appreciated!

Thanks!!!
 
OK... I figured it out... it's called a subdatasheet, and it takes a while to figure out how to set up the properties correctly to get it to work right.

In a nutshell, for two tables with a 1 to 1 or 1 to many relationship, use the form wizard and create a form with a subform. Set the subform view to datasheet. After that's complete, change the properties of the parent form to datasheet also. VIOLA! You should now be able to expand and collapse each of the related records using the "+" and "-" signs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top