Switchboards and combo boxes and subforms ...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!!!
 
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
 
Sprinks!!! Thank you sooooo much!! I was near tears!! It worked great!!!!!!
--
DM


Sprinks said:
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 said:
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!!!
 
Back
Top