view button

buggy2

Board Regular
Joined
Feb 28, 2003
Messages
69
now to finish i need to select particular categories in the query. What i mean is if the person selects the amount checkbox on the form then the query results show the amounts entered for the selected day and time at that time. Any help would be great.

Note the option must be selected from the form checkbox.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
The first way that comes to mind to do this would be to write separate queries for each option and then have VBA code behind the form which selects the appropriate query based upon which option is checked (I would use Option buttons rather than check boxes so that you can only have one category at a time selected). Each query will have Date, Time, and the Category as fields. If you only have a few categories and writing separate queries is an option, then in VBA:

Your CommandButton_OnClick()
If me.optionbutton1=true then
docmd.openquery "Name of First Query", acnormal, acedit
elseif me.optionbutton2=true then
docmd.openquery "Name of Second Query", acnormal, acedit
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,221,501
Messages
6,160,177
Members
451,629
Latest member
MNexcelguy19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top