dennis g
03-24-2002, 11:29 PM
I have a combo box (combo4) that lists several categories. When the user selects
one, a list box populates with the available articles in this category. This is the code for the list box:
SELECT DISTINCT main.[ID] & '. ' & main.[description] AS Expr1
FROM main
WHERE (((main.type)=[combo4]));
And this is what appears in the list box (if the user selects Intermodal):
1. Intermodal Safety procedures
2. Cable seal applications
3. Door strap procedures
I decided to add more info and changed the SQL to this:
SELECT DISTINCT main.[ID] & '. ' & main.[description] & "-------- " & main.[doc] AS Expr1
FROM main
WHERE (((main.type)=[combo4]));
and got this in the list box:
1. Intermodal Safety procedures ---- ims.doc
2. Cable seal applications -------- cable.ppt
3. Door strap procedures --------- strap.ppt
BUT....this only works when I open the form in design mode, open the SQL statement, then close it and re-open it in form view. If I
go straight to the form in form view, it gives the first list. AND, if I get it to work by editing the SQL, then view it, then change categories in the combo box, it also reverts to the original view.
Can someone straighten me out on this?
one, a list box populates with the available articles in this category. This is the code for the list box:
SELECT DISTINCT main.[ID] & '. ' & main.[description] AS Expr1
FROM main
WHERE (((main.type)=[combo4]));
And this is what appears in the list box (if the user selects Intermodal):
1. Intermodal Safety procedures
2. Cable seal applications
3. Door strap procedures
I decided to add more info and changed the SQL to this:
SELECT DISTINCT main.[ID] & '. ' & main.[description] & "-------- " & main.[doc] AS Expr1
FROM main
WHERE (((main.type)=[combo4]));
and got this in the list box:
1. Intermodal Safety procedures ---- ims.doc
2. Cable seal applications -------- cable.ppt
3. Door strap procedures --------- strap.ppt
BUT....this only works when I open the form in design mode, open the SQL statement, then close it and re-open it in form view. If I
go straight to the form in form view, it gives the first list. AND, if I get it to work by editing the SQL, then view it, then change categories in the combo box, it also reverts to the original view.
Can someone straighten me out on this?