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

Newsletter-style columns on Access form?

Status
Not open for further replies.

WaltW

MIS
Jun 14, 2000
130
US
Is there any simple way to set up an Access form and subform(s) so that the subform displays records in more than one column? It's a standard form-subform setup - when a field is changed in the form, corresponding records from a linked table are displayed. Since there are only a couple of fields being displayed in the subform, and sometimes more records than can be displayed on a single screen, I was hoping to be able to have a second column in the subform (or second subform?), so I could still see all the subform records at once. How can I do this?

Walt
 
Not sure if this is what you're looking for, but....

Suppose you want 3 columns, with 25 items displayed in each column. You could place 3 subforms (continuous forms) side by side.

Record source for subform 1:
SELECT TOP 25 ItemID, Item FROM tblItems) ORDER BY Item

Record source for subform 2:
SELECT TOP 25 ItemID, Item FROM tblItems WHERE ItemID Not In (SELECT TOP 25 ItemID FROM tblItems) ORDER BY ItemID

Record source for subform 3:
SELECT TOP 25 ItemID, Item FROM tblItems WHERE ItemID Not In (SELECT TOP 50 ItemID FROM tblItmes) ORDER BY ItemID

You could probably do the same thing with list boxes instead of subforms.


Randy
 
Randy, what happens if more than 75 items are to be displayed ?
 
I think inevitably the last listbox will not have the first "Top" clause and will have to allow for scrollbars to accomodate any overflow.

Ken S.
 
p.s. To make a design like this truly portable I think one would have to start with a count of the records in the recordset, then dynamically place listboxes and resize the form and listboxes as needed - and still you would need to provide an overflow option for very large recordsets.

Ken S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top