Hi there,
I've really appreciated the help that i've gotten from reading and submitting posts to Tek tips.
I have a report that i want to produce. A simple looking report. It just displays a list of product where the criteria is true.
On one of my forms, i have a list of 8 hard coded criteria such as color and each color has a check box. (These colors are hard coded on the display because that's how the boss wants it, so then i need to store them in the PRODUCT TABLE as separate fields.)
I then also created a table listing these 8 colors so that i could list them in a drop down box, and then select one, and then create a report listing all product that are related to that color.
I sort of know the logic of what i want to do, but i do not know the code. (I am assuming that i need to use some sort of recordset, but i have no idea yet how to work with that.) I think that i also need to use a loop, and i don't know how to use that in VBA yet either. Anyway, the following is my logic:
If (Forms![Report form]![cboColor] = Blue) then
Search loop - of all records in PRODUCT TABLE
Find all product where check box for Blue = True
open report "List Product by Color"
End If
If (Forms![Report form]![cboColor] = Red) then ... etc
i guess the simplest way would be to repeat the code for each color, or maybe some sort of Case statement?
I am hoping that this makes sense.
I thank you already for your efforts in looking at this one.
........roddy
I've really appreciated the help that i've gotten from reading and submitting posts to Tek tips.
I have a report that i want to produce. A simple looking report. It just displays a list of product where the criteria is true.
On one of my forms, i have a list of 8 hard coded criteria such as color and each color has a check box. (These colors are hard coded on the display because that's how the boss wants it, so then i need to store them in the PRODUCT TABLE as separate fields.)
I then also created a table listing these 8 colors so that i could list them in a drop down box, and then select one, and then create a report listing all product that are related to that color.
I sort of know the logic of what i want to do, but i do not know the code. (I am assuming that i need to use some sort of recordset, but i have no idea yet how to work with that.) I think that i also need to use a loop, and i don't know how to use that in VBA yet either. Anyway, the following is my logic:
If (Forms![Report form]![cboColor] = Blue) then
Search loop - of all records in PRODUCT TABLE
Find all product where check box for Blue = True
open report "List Product by Color"
End If
If (Forms![Report form]![cboColor] = Red) then ... etc
i guess the simplest way would be to repeat the code for each color, or maybe some sort of Case statement?
I am hoping that this makes sense.
I thank you already for your efforts in looking at this one.
........roddy