If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Subform Columns
Hi, I have a subform that is using a temporary table. The temp table is
deleted and repopulated via a query. The trouble is the amount of columns can vary. Unfortunately the subform still shows the columns from the last time the temp table was created. Is there a way that the subform can be refreshed to show ONLY the columns that are in the temp table? |
#2
|
|||
|
|||
Subform Columns
hi
one way you can achive this is programaticaly show/hide the textboxes in the subform according to the number of fields(columns) in the underlying table: you have to know the maximum number of possible columns and have the subform fit that - give the textboxes repetitive names like text1, text2.... then, in the event of rebuilding the subfom/table: hide all the textboxes for x=1 to 10 me.controls("text" & x).visible=false next x and then, using a: x=1 for each fld in [underlying table] fields me.controls("text" & x).controlsource=fld.name me.controls("text" & x).visible=true x=x+1 next fld you bind and display only the amount of textboxes you need hope it all made sense Erez. "Stevo" wrote: Hi, I have a subform that is using a temporary table. The temp table is deleted and repopulated via a query. The trouble is the amount of columns can vary. Unfortunately the subform still shows the columns from the last time the temp table was created. Is there a way that the subform can be refreshed to show ONLY the columns that are in the temp table? |
Thread Tools | |
Display Modes | |
|
|