Building Form

G

gatarossi

Dear all,

I have tables with this fields:

expenses_control: expenses_code, profit_center, date, value.
date: date
profit_center: profit_center_code, profit_center_description
expenses: expenses_code, expenses_description

The relationship between the tables are:

expenses_control.expense_code = expenses.expense_code
expenses_control.profit_center = profit_center.profit_center_code
expenses_control.date = date.date

Now I'm trying to do a form to imput, to include and to exclude data/
values (not for consults!), like that:

------------------------------------------------------------------------------------------------
EXPENSES CONTROL
Form:
profit_center:__A______________(it's a combobox where the user will
select the profit center).

profit_center_description:_industrial_(it will change according to
profit_center combobox).

date:____________(it's a multiselect combobox where the user will
select the dates - below I will explain better how it must work!!!)

Subform:

expense expense_description 01/01/07 01/02/07 01/03/07
10 salary 10
10,5 11
20 other expenses 2
1,5 3

-------------------------------------------------------------------------------------------------
Now it's my problem: We can see in the column of the subform whith the
dates, before I describe my problem, the information in the table is
like that:

expenses profit_center date value
10 A 01/01/07 10
10 A 01/02/07 10,5
10 A 01/03/07 11
20 A 01/01/07 2
..
..
..

Can I choose dates in the multiselect combobox of my form and it's
appear in columns in my subform? (to include values, etc - not only to
consult).

Thanks!!!

André.
 
K

krissco

I think I would call this post "Filtering a Sub Report From An Unbound
Control"

Sure. You can do that:
http://groups.google.com/group/micr...bform+unbound+control&rnum=1#bac631544ecb64a6


1. Create a textbox control. Lets call it ctrlSubFilter
2. When the selected values of your list box are updated, change the
value in ctrlSubFilter to a filter similar to "IN (selected1,
selected2, selected3. . . )"
3. Specify the ctrlSubFilter as the "Parent" control for linking to
the subform. I think the link provided explains it better.

-Kris
 
G

gatarossi

I think I would call this post "Filtering a Sub Report From An Unbound
Control"

Sure. You can do that:http://groups.google.com/group/microsoft.public.access/browse_thread/...

1. Create a textbox control. Lets call it ctrlSubFilter
2. When the selected values of your list box are updated, change the
value in ctrlSubFilter to a filter similar to "IN (selected1,
selected2, selected3. . . )"
3. Specify the ctrlSubFilter as the "Parent" control for linking to
the subform. I think the link provided explains it better.

-Kris

Dear Kris

I didn't understand it very well. In this example, can I actualize or
include values and data in the subform? And when I select the date on
listbox (because I need a multiselect listbox or combobox) the itens
that I selected will appear in the column position in my subform?

I'm very confused! Do you have some examples?

Thanks!!!

André.
 
K

krissco

André,

I apologize. I was mistaken. AFAIK you can filter the subform on a
single value, but not a list of values (from a multi-select list box).

As far as displaying the dates in the subform, don't you already have
the dates in the subform and want to limit the rows showing to only
those selected? That was my understanding.

Sorry for the confusion.

-Kris
 
G

gatarossi

Dear Kris,

No problem! I knwon I have a very difficult problem! Here in my
country nobody answered this question!

Thanks!

André.
 

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

Similar Threads

Building Form 3
Building Form's Filter 0
Update Values in Unbound Fields 0
building form/subform 0
Joining Form with Subform 2
Umbound Fields 0
Multiselect Listbox 1

Top