If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Switchboards and combo boxes and subforms ...
oh my! Sorry, couldn't resist, but this is driving me crazy!
I have several combo boxes on a Switchboard. They work fine and open the reports that they are supposed to and I can see the records I'm supposed to see; but, when I close the reports, the combo boxes on the Switchboard retain whatever was in them b4 I opened the corresponding report. I need the combo boxes to refresh when the user returns to the Switchboard. If I close the Swithboard after opening the report and open it again when I close the report, I get the desired results. This database will be used by serveral people from a intranet link so I don't think I want to risk them continually closing the Switchboard ... or is that OK??? Any help is appreciated!!! -- DM |
#2
|
|||
|
|||
Switchboards and combo boxes and subforms ...
Hi, DM.
In the switchboards OnActivate event, enter the following code: Dim ctl As Control For Each ctl In Me.Controls If ctl.ControlType = acComboBox Then ctl.Value = Null End If Next ctl ' Put the cursor in the first control Me![YourFirstControl].SetFocus Change "YourFirstControl" to the name of the first combo box. Hope that helps. Sprinks "DM" wrote: oh my! Sorry, couldn't resist, but this is driving me crazy! I have several combo boxes on a Switchboard. They work fine and open the reports that they are supposed to and I can see the records I'm supposed to see; but, when I close the reports, the combo boxes on the Switchboard retain whatever was in them b4 I opened the corresponding report. I need the combo boxes to refresh when the user returns to the Switchboard. If I close the Swithboard after opening the report and open it again when I close the report, I get the desired results. This database will be used by serveral people from a intranet link so I don't think I want to risk them continually closing the Switchboard ... or is that OK??? Any help is appreciated!!! -- DM |
#3
|
|||
|
|||
Switchboards and combo boxes and subforms ...
Sprinks!!! Thank you sooooo much!! I was near tears!! It worked great!!!!!!
-- DM "Sprinks" wrote: Hi, DM. In the switchboards OnActivate event, enter the following code: Dim ctl As Control For Each ctl In Me.Controls If ctl.ControlType = acComboBox Then ctl.Value = Null End If Next ctl ' Put the cursor in the first control Me![YourFirstControl].SetFocus Change "YourFirstControl" to the name of the first combo box. Hope that helps. Sprinks "DM" wrote: oh my! Sorry, couldn't resist, but this is driving me crazy! I have several combo boxes on a Switchboard. They work fine and open the reports that they are supposed to and I can see the records I'm supposed to see; but, when I close the reports, the combo boxes on the Switchboard retain whatever was in them b4 I opened the corresponding report. I need the combo boxes to refresh when the user returns to the Switchboard. If I close the Swithboard after opening the report and open it again when I close the report, I get the desired results. This database will be used by serveral people from a intranet link so I don't think I want to risk them continually closing the Switchboard ... or is that OK??? Any help is appreciated!!! -- DM |
Thread Tools | |
Display Modes | |
|
|