G
Guest
I created a bound list box. But it doesn't store the selected value until I
close that form.
A form has a list box which let user select which year, then go to next form
to select which report. The report will give that year's report.
This is how I created the list box:
1. in form window, click "new" button
2. select "design view" and also chose the table where the object's data
come from (In fact, I am very confusing here. I think this table here I chose
is the field list for this form and will store what user selected. But it
reads like it is the row source data for this form. Or, I am wrong? I should
select the row source table here? But if I chose row source table, later in
control wizard, I have to store the selected value in this table. this is not
right. I need another table to store what user select)
3. then in form design view (control wizard is selected); then I click list
box and drop it in detail area.
4. then follow the wizard. chose its row source table, which field to store
data...
5. finish creating list box. it only have one column.
6. then I added a "open form" command button. this button will bring user to
next form to select which report user want to see. The list box should stored
the value selected and the table which stored this value is connected to many
queries. Then the report will correspondingly show that year's report.
When I select 2003, report will not show 2003's. I have to close the form
which contains this list box. reopen it, select whatever year, report will
show 2003's result.
Do I need to write some VBA code?
Thank you so much for your great help!
Lin
close that form.
A form has a list box which let user select which year, then go to next form
to select which report. The report will give that year's report.
This is how I created the list box:
1. in form window, click "new" button
2. select "design view" and also chose the table where the object's data
come from (In fact, I am very confusing here. I think this table here I chose
is the field list for this form and will store what user selected. But it
reads like it is the row source data for this form. Or, I am wrong? I should
select the row source table here? But if I chose row source table, later in
control wizard, I have to store the selected value in this table. this is not
right. I need another table to store what user select)
3. then in form design view (control wizard is selected); then I click list
box and drop it in detail area.
4. then follow the wizard. chose its row source table, which field to store
data...
5. finish creating list box. it only have one column.
6. then I added a "open form" command button. this button will bring user to
next form to select which report user want to see. The list box should stored
the value selected and the table which stored this value is connected to many
queries. Then the report will correspondingly show that year's report.
When I select 2003, report will not show 2003's. I have to close the form
which contains this list box. reopen it, select whatever year, report will
show 2003's result.
Do I need to write some VBA code?
Thank you so much for your great help!
Lin