G
Guest
Good morning!
I appreciate your assistance on the following scenerio. I need to know:
1.) Is this possible?
2.) What is the syntax or where may I find it?
1.) I have a table of statistics and a form that displays them. When the
statistics are modified a series of update queries runs.
The update queries contain tables in this format:
Table 1
Statistics
Employee Number
Month and so on...
///////
Table 2
Stat
January
February
March
April
May and so on...
////////
Table 3
Rating
January
February
March
April
May and so on...
////////
Table 1 Statistic joins N:1 with Table 2 (Statistic N:1 Stat), and Table 2
joins N:1 with Table 3 (i.e. January N:1 Rating). The values that update are
the rating from (i.e. January) field in Table 2 and the value from the (i.e.
January) field in Table 3.
I would like to create a query in VBA that looks at the month on the form
(Table 1) and based on it, assigns the correct month Rating (Table 2) and
correct month Value (Table 3) for the month matching Table 1.
This way I do not have to go into each update query every month and change
the inner joins to the month I want since the ratings and values may differ
from month to month.
Can I eliminate my update queries and simply write a query in VBA that will
look at the month on the form and based on that month, update the ratings and
weights on the statistics table accordingly?
2.) What is the syntax.. just need a start. I understand how to open tables
and add new records but have never written an update query in code and do not
know how to declare what fields in the table to use based on the form.
Your assistance is much needed and appreciated!
Thank you in advance,
Sandy Skaar
Database Coordinator
I appreciate your assistance on the following scenerio. I need to know:
1.) Is this possible?
2.) What is the syntax or where may I find it?
1.) I have a table of statistics and a form that displays them. When the
statistics are modified a series of update queries runs.
The update queries contain tables in this format:
Table 1
Statistics
Employee Number
Month and so on...
///////
Table 2
Stat
January
February
March
April
May and so on...
////////
Table 3
Rating
January
February
March
April
May and so on...
////////
Table 1 Statistic joins N:1 with Table 2 (Statistic N:1 Stat), and Table 2
joins N:1 with Table 3 (i.e. January N:1 Rating). The values that update are
the rating from (i.e. January) field in Table 2 and the value from the (i.e.
January) field in Table 3.
I would like to create a query in VBA that looks at the month on the form
(Table 1) and based on it, assigns the correct month Rating (Table 2) and
correct month Value (Table 3) for the month matching Table 1.
This way I do not have to go into each update query every month and change
the inner joins to the month I want since the ratings and values may differ
from month to month.
Can I eliminate my update queries and simply write a query in VBA that will
look at the month on the form and based on that month, update the ratings and
weights on the statistics table accordingly?
2.) What is the syntax.. just need a start. I understand how to open tables
and add new records but have never written an update query in code and do not
know how to declare what fields in the table to use based on the form.
Your assistance is much needed and appreciated!
Thank you in advance,
Sandy Skaar
Database Coordinator