I have a button on an Access form that when clicked runs a macro that echoes, runs a query and maximizes the window. Now I added an option group that has two check boxes. What I want to do is, when the button is now clicked it will run either macro1 or macro2 based on which check box is checked.
Macro1 would run a query that sorts on Field A and Macro2 would run a query that sorts on Field B.
I thought it would be easiest (not good with code )to create 2 separate queries and 2 macros that would run either choice. With that said, how would I add an IF THEN statement into a query.
So it would say... when button is clicked and check box 1 is checked, then run macro1 that runs query1, if check box 2 is checked, then run macro2 that runs query2.
I know some more seasoned Access uses are saying there is a better way, but without being very knowledgeable with writing code, that's the best I could think of
Any suggestions?
Thanks, Paul
Macro1 would run a query that sorts on Field A and Macro2 would run a query that sorts on Field B.
I thought it would be easiest (not good with code )to create 2 separate queries and 2 macros that would run either choice. With that said, how would I add an IF THEN statement into a query.
So it would say... when button is clicked and check box 1 is checked, then run macro1 that runs query1, if check box 2 is checked, then run macro2 that runs query2.
I know some more seasoned Access uses are saying there is a better way, but without being very knowledgeable with writing code, that's the best I could think of
Any suggestions?
Thanks, Paul