L
LLao
I've looked all over access for help on this but could not find the perfect
fit. I’ve read everything I could find on cascading but that’s not exactly
what I want. Here goes.
I have a combo box that contains test names, and based on the test name
selected, I would like it to output (into a test box preferably which can
shrink or grow to fit the list size) a list of the data pertaining to that
specific test. The same data name can be used for different tests. Lastly, I
would like the values for this list to be stored on the form.
For example, my table, tblOperation, will have two fields: TestName, Data.
The first test, let’s call it Test1 for simplicity, contains data: Temp1,
Temp2, Temp3.
Test2, will contain data: Temp1, Temp2, Jitter1, Jitter2, Jitter3
Test3, will contain data: Jitter1, Sensor1
This is the table I have so far:
TestName Data
Test1 Temp1
Test1 Temp2
Test1 Temp3
Test2 Temp1
Test2 Temp2
Test2 Jitter1
Test2 Jitter2
Test2 Jitter3
Test3 Jitter1
Test3 Sensor1
I know how to get my combo box to display “Test1, Test2, Test3â€, by using
the following code in the RowSource:
SELECT DISTINCT tblOperation.TestName FROM tblOperation;
But I am having trouble with the second part on how to select “Test1†from
the combo box and have that automatically generate a text box showing the
data values “Temp1, Temp2, Temp3â€, or selecting "Test2" and outputting
"Temp1, Temp2, Jitter1, Jitter2, Jitter3" etc.
I have the code below but I think it only works on combo boxes, and I need
the box outputting the data to be a text box (or some box type that will
allow for data of varying size, ie CanGrow or CanShrink to fit it) that
stores the data values.
SELECT DISTINCTROW tblOperation.data FROM tblOperation WHERE
(((tblOperation.TestName) Like forms!frmSimple!combo0));
Please help, this has been driving me nuts for days. Thanks!
fit. I’ve read everything I could find on cascading but that’s not exactly
what I want. Here goes.
I have a combo box that contains test names, and based on the test name
selected, I would like it to output (into a test box preferably which can
shrink or grow to fit the list size) a list of the data pertaining to that
specific test. The same data name can be used for different tests. Lastly, I
would like the values for this list to be stored on the form.
For example, my table, tblOperation, will have two fields: TestName, Data.
The first test, let’s call it Test1 for simplicity, contains data: Temp1,
Temp2, Temp3.
Test2, will contain data: Temp1, Temp2, Jitter1, Jitter2, Jitter3
Test3, will contain data: Jitter1, Sensor1
This is the table I have so far:
TestName Data
Test1 Temp1
Test1 Temp2
Test1 Temp3
Test2 Temp1
Test2 Temp2
Test2 Jitter1
Test2 Jitter2
Test2 Jitter3
Test3 Jitter1
Test3 Sensor1
I know how to get my combo box to display “Test1, Test2, Test3â€, by using
the following code in the RowSource:
SELECT DISTINCT tblOperation.TestName FROM tblOperation;
But I am having trouble with the second part on how to select “Test1†from
the combo box and have that automatically generate a text box showing the
data values “Temp1, Temp2, Temp3â€, or selecting "Test2" and outputting
"Temp1, Temp2, Jitter1, Jitter2, Jitter3" etc.
I have the code below but I think it only works on combo boxes, and I need
the box outputting the data to be a text box (or some box type that will
allow for data of varying size, ie CanGrow or CanShrink to fit it) that
stores the data values.
SELECT DISTINCTROW tblOperation.data FROM tblOperation WHERE
(((tblOperation.TestName) Like forms!frmSimple!combo0));
Please help, this has been driving me nuts for days. Thanks!