Refresh Form

84hickman

New Member
Joined
Mar 18, 2010
Messages
17
I have a form that has four listboxes and a command button. The command button runs a macro that starts a query using the choices of the 4 listboxes as parameters. If nothing is selected in a certain listbox then records with any value in that related field are returned. This all is working great.

What I would like to do is clear the user's choices after running the query... or upon clicking a new command button.

This seems like it should be simple to do... but I just can't seem to get it to work.



Thank you!!
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Actually... I lied.

It looks like it clears the choices on the form but when I try to run the query a second time after clearing the previous choices I get an error message.

"The expression is typed incorrectly, or it is too complex to be evaluated....."
 
Upvote 0
Can you post the code/SQL involved?
You could try a Debug.print statement or statements to see what is being done.
 
Upvote 0

Forum statistics

Threads
1,222,830
Messages
6,168,511
Members
452,194
Latest member
Lowie27

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