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

Displaying recordset results in different tables 1

Status
Not open for further replies.

virtualranger

Technical User
Sep 14, 2001
115
GB
I've had a look at the FAQ and done a search but can't find what I'm looking for.

I've got all my data from an Access Db and can display it in a simple table. My data contains an attribute called developmentID (not unique) and is ordered by that attribute. I would like to diplay my data in separate tables - a different table for each set of records based on developmentID. Does that make sense?

How can I go about doing this? I'm not sure how to get the code to cycle through the record set and identify where a new developmentID begins in order for me to close the old table and open a new one.


Thanks,
Jamie
 
Before you start reading the recordset, set a variable such as lastDevID to some value that will not occur in the database. As you read each record, compare it's development ID to the value of lastDevID. If the value is not equal, start a new table, then set lastDevID to the new development ID.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
That'll do it! I knew it would be simple. Many thanks.

Thanks,
Jamie
 
You're quite welcome. That's what we're here for, Sometimes the things that seem difficult aren't, if you can find someone to point you in the right direction.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top