(Msg. 1) Posted: Wed Jul 23, 2008 9:12 am
Post subject: Multiple Table lookup Add to elertz Archived from groups: microsoft>public>access>tablesdbdesign (more info?)
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?
(Msg. 2) Posted: Wed Jul 23, 2008 10:46 am
Post subject: RE: Multiple Table lookup Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
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.
--
Please remember to mark this post as answered if this solves your problem.
"Maria315" wrote:
> 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?
>
(Msg. 3) Posted: Wed Jul 23, 2008 1:06 pm
Post subject: RE: Multiple Table lookup Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
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.
--
Dave Hargis, Microsoft Access MVP
"Maria315" wrote:
> 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?
>
(Msg. 4) Posted: Wed Jul 23, 2008 1:55 pm
Post subject: Re: Multiple Table lookup Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
You have encountered the problem that occurs when tables are not
normaslized. If possible you need to change the design of your tables to
something like:
TblContributionWeek
ContributionWeekID
ContributionWeek
<Other contribution week fields you need>
TblContribution
ContributionID
ContributionWeekID
Contribution
<Other contribution fields you need>
Changing the table structure is not as difficult as it may appear. You need
to use append queries and or update queries to move existing data into the
new tables. Then you need to modify any queries, forms and reports that use
your existing weekly tables.
Steve
"Maria315" <osterhoudt.maria RemoveThis @spcollege.edu> wrote in message
news:4906905f-0a7e-455a-8ed5-75ac7a206073@y21g2000hsf.googlegroups.com...
>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?
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum