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!

Dynamic form, keep col and row headings still, scroll crosstab data?

Status
Not open for further replies.

Ahliana

Programmer
Sep 4, 2002
27
0
0
US
Access 2k, WinXP.

Due to the fact that we are deploying this worldwide, including very remote sites with SLOW dial-up connections, I am not able to use extra controls, which is why I am so limited in this. So here's a challenge...

I am dynamically creating a form that represents crosstab data. The rows and columns are not a fixed number, they change every time the form is created. The form is based on a crosstab query.

Currently, I loop through the recordset, creating text boxes for each field of each record. I also have to conditionallly format each cell, and conditionally lock it. I actually have it working well at this point, creating the column labels in one loop, then the data in another loop. Simple enough so far, right? ;-)

NOW they want the column labels to stay put even if they scroll down. I could simply put them in the form header. But they want the 3 left columns, which are dynamically created but are actually labels to the quantity grid (of text boxes) to the right, to remain in place. This is like locking column and row headings in Excel, like creating panes.

Visually this makes sense. Any suggestions on how to do it in Access forms?

Imagine something like the following:
[tt]
Item Desc. 01-Jan 02-Jan 03-Jan
A-123 Cubicle
Q17 Desk
812 Desk light 8 0 10
817 Clip light 8 0 0
C01 Computer
421 Cable conn 24 24 24
501 Power use 8 0 10
[/tt]

If I put the quantity grid in a subform, then I don't know how to make that scroll the same as the row headings in the main form. If I put the column headings in the form header, I don't know how to keep the row headings from scrolling offscreen when they have 30 days or so.

I have considered dual subforms, so that the column headings are in the form headers and the row headings are in one subform while the quantity grid is in the other subform, but I don't know how to use one scrollbar to let them scroll vertically and still keep the rows matched up between subforms.

After they make any changes, I loop through all of the controls and write changes back to the original base table.

Any suggestions (ok, at least mildly helpful ones) are greatly appreciated.

Notes of my lack of sanity are already taken into account.


Ahliana
Argue for your limitations and, sure enough, they're yours! - Richard Bach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top