Need help in list box

  • Follow


Dear Sirs ,

I have a question and I need your help , it is very urgent please .

I am using Microsoft access 2007 and I have a table called =93Type
Table=94  it contains tow fields : Typecode and TypeName  , so when I
have a new type I will add it to this table  .

I have a second table called =93Etape Table=94 it contains a several field
and one of these fields called =93 type code=94  (take the data from the
Type Table)

I need to create a  form  to view all the etapes related to  types
that I will select from a list box .
So my question is :

How can I create a list box contains all the type that=92s in =93Type
Table=94 and near each type I need to appear a  check box , from that I
can click on these check box to select the types that I need to filter
and view all the etapes that related to the types selected ?

Example assuming we have in the type table three value : red, green
and white  and I have in the Etape table several etapes related to :
red, green and white

So when I open this list box it appear like trhis
Red       check box to select or deselect the red
green       check box to select or deselect the green
white       check box to select or deselect the white


and after each selection the data appear in the form based on the
selection .

Regards ,
0
Reply Wisso 4/30/2010 1:27:52 PM

Wisso wrote:
> Dear Sirs ,
> 
> I have a question and I need your help , it is very urgent please .
> 
> I am using Microsoft access 2007 and I have a table called �Type
> Table�  it contains tow fields : Typecode and TypeName  , so when I
> have a new type I will add it to this table  .
> 
> I have a second table called �Etape Table� it contains a several field
> and one of these fields called � type code�  (take the data from the
> Type Table)
> 
> I need to create a  form  to view all the etapes related to  types
> that I will select from a list box .
> So my question is :
> 
> How can I create a list box contains all the type that�s in �Type
> Table� and near each type I need to appear a  check box , from that I
> can click on these check box to select the types that I need to filter
> and view all the etapes that related to the types selected ?
> 
> Example assuming we have in the type table three value : red, green
> and white  and I have in the Etape table several etapes related to :
> red, green and white
> 
> So when I open this list box it appear like trhis
> Red       check box to select or deselect the red
> green       check box to select or deselect the green
> white       check box to select or deselect the white
> 
> 
> and after each selection the data appear in the form based on the
> selection .
> 
> Regards ,

I might use an Option group called FrameColor with a default of 0 
(since you mention checkboxes instead of a combo) instead.  Then add a 
Textbox and make it invisible (Called txtColor).  It would have a 
default value of 0.

Your list box would have a Where clause like
	Where ColorID = " & Forms!YourFormName!txtColor

Then when someone clicks on a checkbox, call the Frames afterupdate event.
	Select case FrameColor
	Case 1
		Me.txtColor = 222  'color for Red in table
	Case 2
		Me.txtColor = 3  'color for Green in table
	Case 3
		Me.txtColor = 55  'color for Blue in table
	End Select
	Me.YouListBoxName.Requery

If Combo, set default to 0.  The Where would be
	Where ColorID = " & Forms!YourFormName!ComboBoxName

and in the afterupdate event of the combo,
	Me.YouListBoxName.Requery

	
0
Reply Salad 4/30/2010 2:08:23 PM


1 Replies
162 Views

(page loaded in 0.045 seconds)

Similiar Articles:













7/24/2012 5:10:15 AM


Reply: