Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reset an open report to the current selection in combo Box

Status
Not open for further replies.

Saturn87

IS-IT--Management
May 14, 2002
7
US
I have a combo box that opens a report (based on the value of that combo box) when a command button is pressed. If the user doesn't close the current version of the report and makes another selection from the combo box and presses the command button, the report pulls up the previous report. I would like the report to be reset to the current selection of the combo box even if the user doesn't close the last report. Is this possible?
 
I gather the combo box is a list of report names and you pass the argument to openreport.
The concept is fine. A lot of people use this method, and the fact that a report is still open or not should not effect the concept.

Use the debugger within the code of your command button. Make sure the argument being passed to openreport is correct. If you can’t isolate the problem, post the code behind the button.

Robert Berman

 
How about requerying the combo box after its updated.

Put into After Update property of combo (at the start) so it refreshes before doing anything else.

Me![ComboBoxName].Requery

otherwise, as 'thornmastr' says post the code within the combo and the command button.
 
A requery will guarantee that the combo box will loose its last used value, unless it happens to be the default value of the combo box. Try it.

Robert Berman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top