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  

Limit combo box selections by Option Group button selected.



 
 
Thread Tools Display Modes
  #1  
Old December 15th, 2005, 04:22 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Limit combo box selections by Option Group button selected.

Combo box lists all offices. Need to limit selection to one of three choices
(offices in certain regions) in Option Group. How does one do that?
  #2  
Old December 16th, 2005, 03:11 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Limit combo box selections by Option Group button selected.

Hi,


Change the rowsource property, in the gotFocus event of the combo box, as
example.


Dim str As string ' to hold temporary SQL statement

str="SELECT fieldName FROM tableName WHERE
RegionID=FORMS!FormName!FrameControlName"

If str = Me.ComboBoxName.RowSource then
'do nothing
Else
Me.ComboBoxName.Rowsource= str ' that implicitly requeries the list
End If



Hoping it may help,
Vanderghast, Access MVP

"tjcollier" wrote in message
...
Combo box lists all offices. Need to limit selection to one of three
choices
(offices in certain regions) in Option Group. How does one do that?



  #3  
Old December 16th, 2005, 07:05 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Limit combo box selections by Option Group button selected.

thank you . . . I was still stuck. Beginner/Novice Acess user. I will try
this and get back with you hopefully to tell you of my success!

Tom

"Michel Walsh" wrote:

Hi,


Change the rowsource property, in the gotFocus event of the combo box, as
example.


Dim str As string ' to hold temporary SQL statement

str="SELECT fieldName FROM tableName WHERE
RegionID=FORMS!FormName!FrameControlName"

If str = Me.ComboBoxName.RowSource then
'do nothing
Else
Me.ComboBoxName.Rowsource= str ' that implicitly requeries the list
End If



Hoping it may help,
Vanderghast, Access MVP

"tjcollier" wrote in message
...
Combo box lists all offices. Need to limit selection to one of three
choices
(offices in certain regions) in Option Group. How does one do that?




 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Report subtotals using an option button group Richard Harison Setting Up & Running Reports 4 April 16th, 2005 12:08 PM
Ambiguous outer joins Renwick New Users 1 February 22nd, 2005 02:08 PM
Option Group cooperation with a NEXT button Stefanos_Karametos General Discussion 8 August 22nd, 2004 11:44 AM
Help Needed for Groups Please Paul Black General Discussion 15 June 21st, 2004 02:54 AM
option group versus combo box Deb New Users 2 May 26th, 2004 02:34 PM


All times are GMT +1. The time now is 08:49 AM.


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