I'm a newbie to Access VBA and I'm not sure where to start with the code. I'm using Access 2002. I have created a form to generate a report. On the form, I have 3 options using radio buttons. First option will select all data from a table. The second options will only contain values that are equalled to lets say "milk", "eggs" and "ham". The third option will pop up a list box that will allow the user to select items for the query. Thanks in advance
Ok what do you want..
for starter option buttons are 2 types viz. radio buttons (round ones) and check boxes (square ones).
Radio buttons are used to select only one of the group
checkboxes allows user to select more than one option in the same group
tvdrajkumar is right. However, you did specify in your post that you are using Radio Buttons but what you didn't specify is what exactly you are trying to accomplish. I have to assume that it's a specific query to apply to your created report so as to display data based on the criteria from the selected Radio Button.
You really haven't provided enough information but never the less, I suppose you will need to generate a SELECT query via VBA code and apply it to the Record Source property of your Report. Strictly based upon the Option Button selected of course. For example:
SELECT * FROM YourTable WHERE CriteriaBasedOnOptionSelected;