I have a form with fields and a combobox based on two tables.
The fields I'm working with from tbl_impound that are displayed on form frm_impound:
Vehicle Date Time Class
I also have a table tbl_class_op with fields
Vehicle
Date
Time
Class
On form frm_impound I have a combo box for the field class with the data selected as
When I open the form the first record's combo box filters correctly. When I page to the next record I wanted the combo box to updated based on the new vehicle being displayed but it's still showing the class for the first vehicle.
Example:
tbl_class_op
Vehicle Date Time Class
1 1/1 10:00 A
1 1/1 10:10 B
1 1/1 10:20 C
2 1/1 10:00 D
2 1/1 10:10 E
2 1/1 10:20 E
2 1/1 10:30 D
This is what I want:
frm_impound:
Vehicle Date Time Class Combo choices
1 1/1 10:05 A, B, C
1 1/1 10:40 A, B, C
2 1/1 10:10 D, E
What I'm getting:
frm_impound:
Vehicle Date Time Class Combo choices should be
1 1/1 10:05 A, B, C
1 1/1 10:40 A, B, C
2 1/1 10:10 A, B, C
Can someone tell me how to fix this? Also, can I do this on a continious form?
Thanks in advance!
Debbie![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)
The fields I'm working with from tbl_impound that are displayed on form frm_impound:
Vehicle Date Time Class
I also have a table tbl_class_op with fields
Vehicle
Date
Time
Class
On form frm_impound I have a combo box for the field class with the data selected as
Code:
SELECT DISTINCT tbl_class_op.Class, tbl_class_op.Vehicle FROM tbl_class_op where vehicle =
forms![frm_impound]![vehicle];
When I open the form the first record's combo box filters correctly. When I page to the next record I wanted the combo box to updated based on the new vehicle being displayed but it's still showing the class for the first vehicle.
Example:
tbl_class_op
Vehicle Date Time Class
1 1/1 10:00 A
1 1/1 10:10 B
1 1/1 10:20 C
2 1/1 10:00 D
2 1/1 10:10 E
2 1/1 10:20 E
2 1/1 10:30 D
This is what I want:
frm_impound:
Vehicle Date Time Class Combo choices
1 1/1 10:05 A, B, C
1 1/1 10:40 A, B, C
2 1/1 10:10 D, E
What I'm getting:
frm_impound:
Vehicle Date Time Class Combo choices should be
1 1/1 10:05 A, B, C
1 1/1 10:40 A, B, C
2 1/1 10:10 A, B, C
Can someone tell me how to fix this? Also, can I do this on a continious form?
Thanks in advance!
Debbie
![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)