A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Switchboards and combo boxes and subforms ...



 
 
Thread Tools Display Modes
  #1  
Old December 7th, 2005, 02:54 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default 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  
Old December 7th, 2005, 02:21 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default 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  
Old December 8th, 2005, 01:04 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.