From: Wisso on
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 ,
From: Salad on
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


 | 
Pages: 1
Prev: blurry PDFs
Next: DLOOKUP being a PIA