Sorry, but Your post isn't very clear. Buttons don't have Record Sources and you can't enter anything in MessageBoxes!
"...they get a drop down box to choose criteria...I know that I can create a combo box on the form and put code behind the button but I'm trying to eliminate too many boxes."
Well, since a "dropdown box" and a *combobox* are the same thing, it's going to be tough! If you're concerned about the combobox taking up too much space on your form, only show it when the user needs it to select the criteria, I assume for the query you mentioned.
Setup your combobox; in the properties box set the Visible property to No.
Behind the button you mentioned, use this code:
Your user can now select the needed criteria.
Private Sub YourCommandButton_Click()
MyComboBoxName.Visible = True 'makes the box visible
Do whatever else you have to, running a query by the sounds of it.
Then, to make your combobox invisible again:
The SomeOtherControl can be any control on your form that can have focus. You have to do this because you cannot make a control, such as your combobox, invisible when it has focus.
Private Sub ComboBoxName_AfterUpdate()
SomeOtherControl.SetFocus 'set focus to any control other than your combobox
ComboBoxName.Visible = False 'make the combobox invisible again
Hope this helps!
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007