Need help in list box

W

Wisso

Dear Sirs ,

Could you please explain to me how could I place a question in
allenbrowne.com and from where I can view the respond ?

Now 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 ,
 
T

Tom van Stiphout

On Fri, 30 Apr 2010 06:22:02 -0700 (PDT), Wisso

I probably would not use a listbox but a subform. It would have the
checkbox column to select rows, a hidden column with TypeID, and a
visible column with TypeName.
I would have a new table IN THE FRONT-END with 2 columns:
PrimaryKeyValue (long int) and IsSelected (yes/no). When the subform
is opened I populate this table with (in this case) all TypeCodes
using an Append query. Then my subform uses a query as its
RecordSource that is a join between this table and the Types table.
Now the user can select some checkboxes, and my table will get
IsSelected set to Yes for some PrimaryKeyValues.
Next I can use this information to filter the Etapes. That form will
use a query as its RecordSource that is a join between Etapes and my
table, where IsSelected is True.

It takes a bit of time to setup for the first time, but it is a nice,
user friendly, and reusable design pattern.

-Tom.
Microsoft Access MVP
 
W

Wisso

On Fri, 30 Apr 2010 06:22:02 -0700 (PDT), Wisso


I probably would not use a listbox but a subform. It would have the
checkbox column to select rows, a hidden column with TypeID, and a
visible column with TypeName.
I would have a new table IN THE FRONT-END with 2 columns:
PrimaryKeyValue (long int) and IsSelected (yes/no). When the subform
is opened I populate this table with (in this case) all TypeCodes
using an Append query. Then my subform uses a query as its
RecordSource that is a join between this table and the Types table.
Now the user can select some checkboxes, and my table will get
IsSelected set to Yes for some PrimaryKeyValues.
Next I can use this information to filter the Etapes. That form will
use a query as its RecordSource that is a join between Etapes and my
table, where IsSelected is True.

It takes a bit of time to setup for the first time, but it is a nice,
user friendly, and reusable design pattern.

-Tom.
Microsoft Access MVP














- Show quoted text -

Thanks Tom ,
you give me a very good solution , but i made a some change on it .
instead to create a new table and append a query from type table to
this new table , i add just a new field to the type table and named
IsSelected a continue the next work normally
 
T

Tom van Stiphout

On Fri, 30 Apr 2010 09:50:37 -0700 (PDT), Wisso

That works great IF you are the only user.

-Tom.
Microsoft Access MVP
 
?

???

1111111111111111111111111111111111
"Wisso" <[email protected]>
??????:[email protected]...
Dear Sirs ,

Could you please explain to me how could I place a question in
allenbrowne.com and from where I can view the respond ?

Now 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 ,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top