Multiple Table lookup

M

Maria315

I have an database with weekly tables for contributions. I would like
to build a form that will allow users to select the table they want
from a drop down or parameter. I can work with Macros but not so good
with SQL. Is it possible to create a parameter query and link to the
form or a macro which would call for the table?
 
R

Ryan

Make another table and put in it the names of your weeks. Then create a form
for each of your weak tables and use the same name you just put in your weeks
table. Next create a form for them to choose the week, add a dropdown to the
form, name it WeekFilter, and set its conotrol source to your new weeks
table. Add a comand button to your form and call it OpenWeek. In the on
click event of the command button add this code.

Private Sub OpenWeek_Click()
Dim WeekForm As String
WeekForm = Me!WeekFilter

DoCmd.OpenForm WeekForm
End Sub

This will take the value you selected in your dropdown and open the form
with that name.

Hope this helps.
 
K

Klatuu

You first mistake is you are using a different table for each week. This
will actually make things much harder for you. The correct method would be
to have one table for all contributions with a field that identifies the week
and year of the contributions. In fact, if you already have a contribution
date in the table, that field will suffice.

Then when you need to see contributions for a specific week, you use a query
that is filtered on that week.
 

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