Problems with a Tab Control

Mimadocken

Registered User.
Local time
Today, 10:21
Joined
Mar 12, 2012
Messages
81
I have a database about knitting, and I thought it would be good for people to be able to filter their yarns by multiple criteria, so I placed a copy of the same form (continuous form) onto 3 Tab Controls. On the first Tab, I'm trying to sort the yarns by color family (reds, blues, greens, etc.) On the second tab the sort would be by yarn thickness (laceweight, fingering, worsted, etc.). On the third tab, the sort would be by fiber content (wool, acrylic, cotton, etc.)

Unfortunately, I'm having some problems. I tried to put a combo box onto each Tab with the filter selections, but the only fields I'm being given to store the selection is the field from the table, and when I select that, the first yarn in the table gets its color/thickness/fiber changed to the selected item.

Next I tried making it an unbound combo box that holds onto the selection. I thought I'd link the combo box as the master field to the color field on the underlying table on the first tab, to the thickness field on the second tab, and to the fiber field on the third tab. However, Access isn't allowing me to do this.

How can I make this work well? All suggestions are appreciated.
 
Can I suggest a slightly different strategy - it might be confusing having three forms that all display the same data.

Instead I would have a single form, but three combo-boxes for the user to select the data they wish to view. Each combo box would display the options for a given field in the table, and also display an option to display all records.

For example:
SELECT YarnWeight, 1 AS SortOrder FROM tblYarns
UNION SELECT "ALL", 0 FROM tblYarns
ORDER BY SortOrder, YarnWeight;

This will then display something like

ALL 0
weight 1 1
weight 2 1
weight 3 1

Then the filter does not need to be applied for each combobox if the user has selected "ALL"
 

Users who are viewing this thread

Back
Top Bottom