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  

List box Question



 
 
Thread Tools Display Modes
  #1  
Old December 14th, 2006, 05:05 PM posted to microsoft.public.access.forms
Professional_in_need_of help
external usenet poster
 
Posts: 41
Default List box Question

I have to list box strLoggedBy and str Group and I want the group box to
change everytime I change the strLoggedBy box. Here the setup of thier tables

strLoggedby is coming from tblLoggedByNames the strLoggedbyNames column.
strGroups is coming from tblLoggedByNames the strGroup column.

Please help.
  #2  
Old December 14th, 2006, 05:25 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default List box Question

Use the Lost Focus event of the first list box to requery the second list
box. For the second list box to change, its row source will need to be
filtered on the content of the first list box.

The trick here is whether the list boxes are multi select or not. If they
are not multi select, I would suggest using Combo boxes instead. The are
easier to work with and are easier for the user. If they are multi select,
then creating the filtering becomes a bit more code intensive.

"Professional_in_need_of help" wrote:

I have to list box strLoggedBy and str Group and I want the group box to
change everytime I change the strLoggedBy box. Here the setup of thier tables

strLoggedby is coming from tblLoggedByNames the strLoggedbyNames column.
strGroups is coming from tblLoggedByNames the strGroup column.

Please help.

  #3  
Old December 14th, 2006, 05:28 PM posted to microsoft.public.access.forms
Professional_in_need_of help
external usenet poster
 
Posts: 41
Default List box Question

Sorry the they are combo boxs, is it possible that you tell me step by step
how to do this.

"Klatuu" wrote:

Use the Lost Focus event of the first list box to requery the second list
box. For the second list box to change, its row source will need to be
filtered on the content of the first list box.

The trick here is whether the list boxes are multi select or not. If they
are not multi select, I would suggest using Combo boxes instead. The are
easier to work with and are easier for the user. If they are multi select,
then creating the filtering becomes a bit more code intensive.

"Professional_in_need_of help" wrote:

I have to list box strLoggedBy and str Group and I want the group box to
change everytime I change the strLoggedBy box. Here the setup of thier tables

strLoggedby is coming from tblLoggedByNames the strLoggedbyNames column.
strGroups is coming from tblLoggedByNames the strGroup column.

Please help.

  #4  
Old December 14th, 2006, 06:04 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default List box Question

Okay since they are combo boxes, we will use the After Update event.

The row source for LoggedByNames should look something like:
SELECT LoggedByNames FROM tblLoggedByNames;

And for Group, so it will filter on the Name selected in the first combo:
SELECT [Group] FROM tblLoggedByNames WHERE LoggedByNames =
Me.cboLoggedByNames;

Then in the After Update event of the first combo, requery the second:

Me.cboGroup.Requery

strLoggedby is coming from tblLoggedByNames the strLoggedbyNames column.
strGroups is coming from tblLoggedByNames the strGroup column.



"Professional_in_need_of help" wrote:

Sorry the they are combo boxs, is it possible that you tell me step by step
how to do this.

"Klatuu" wrote:

Use the Lost Focus event of the first list box to requery the second list
box. For the second list box to change, its row source will need to be
filtered on the content of the first list box.

The trick here is whether the list boxes are multi select or not. If they
are not multi select, I would suggest using Combo boxes instead. The are
easier to work with and are easier for the user. If they are multi select,
then creating the filtering becomes a bit more code intensive.

"Professional_in_need_of help" wrote:

I have to list box strLoggedBy and str Group and I want the group box to
change everytime I change the strLoggedBy box. Here the setup of thier tables

strLoggedby is coming from tblLoggedByNames the strLoggedbyNames column.
strGroups is coming from tblLoggedByNames the strGroup column.

Please help.

 




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 08:23 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.