Too Many files

  • Thread starter Thread starter Terry
  • Start date Start date
T

Terry

I created six tables with 92 field names; each table is the same except for
one field name. The table to be used on one form, I had planed to use the tab
control option in the form design view, to store the field names. It would
seem that my six tables are too large to create a query to include all the
files within the six tables. Without creating multiple forms, is there a
different method that can be used Thank you
 
I don't remember the exact number for the maximum number of fields per row
in a recordset but if you tell us that you have reached this limit, I
believe you. In your case, the only choice I would see would be to use
subforms; one for each of your tab.

Another possibility to only retrieve the fields of one table but when the
user changes tab, to retrieve and display the data for another table.
 
Terry said:
one field name. The table to be used on one form, I had planed to use the tab
control option in the form design view, to store the field names. It would
seem that my six tables are too large to create a query to include all the
files within the six tables. Without creating multiple forms, is there a
different method that can be used Thank you

I would wonder if your data is properly normalized? What's the
difference between the six tables? You mention one field name. What
is that field used for? Should it be put onto it's own table?

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
Running under the assumption that you really DO need to have all of that
stuff "at once" - consider this...

6 by 96 controls is probably more than you can have associated with a form
(and its subforms) at any given time. A client of mine kept crashed Access
in design view when they went to add "jsut one more" control. They had a
half dozen or so pages on a tabbed control and were bringing "everything".
Even after they trimmed it down, it was also, shall we say, sluggish.

Here's a way to work around it if you really must have all of that stuff.

Main form - may be bound to a record.

1) On the main form, add a tabbed control. I'll call it 'myTab'. Put your
6 tabs on it. Make the page below it zero height.

2) Create a form "sfm_PlaceHolder". No bound record source, no controls, no
navigation buttons, no record selectors. Essentially empty.

3) Drag and drop sfm_PlaceHolder onto the main form, and position it snug up
under the tab control. Size it to be the size of your desired 'page'.

4) Create your 6 subforms for the 6 tables. For our purposes, name them
sfm_Tab_0, ... sfm_Tab_5.

5) in main's code behind form, add the following

a) Private Sub myTab_Change()
Select Case myTab.Value
Case 0
Me.sfm_PlaceHolder.SourceObject = "sfm_Tab_0"
...
Case 5
Me.sfm_PaceHolder.SOurceObject = "sfm_tab_5"
End Select
' If you need to alter the row source, i.e. change condition, you could
do it here
' While I just show an array of SQL statements, you could construcrt
one on the fly
' with various parameters from the user, etc.
Me.sfm_PlaceHolder.RecordSource = SQL_statement(Me.myTab.Value)
' or similar
Me.sfm_PlaceHolder.Requery
End Sub

b) Private Sub Form_Open()
myTab.Value = 0 ' forces the display of the first subform
End Sub

c) Private Sub Form_Current()
myTab.Value = 0 ' forces the display of the first subform
End Sub
 
Back
Top