I'm using Access 2010 and using VBA I'd like to have the selection that I make in a List or Combo box determine which query to run.
For instance, if I select Group, I'd like the query that uses a group factor (calculation) to append form data to table A. If I select Division, I'd like the query that uses a division factor (calculation) to append form data to table A.
I need to use different queries because not only will the query load data from a form, it will also do a calculation based on a factor that can change based on the selection. This calculation is then also loaded into table A in an Adjustment amount field.
Also, just to make things complicated, I'll have approximately 20 different factors so I thought using different queries would be best to keep it all straight.
Any guidance and examples anyone can provide would be appreciated.
Thanks.
For instance, if I select Group, I'd like the query that uses a group factor (calculation) to append form data to table A. If I select Division, I'd like the query that uses a division factor (calculation) to append form data to table A.
I need to use different queries because not only will the query load data from a form, it will also do a calculation based on a factor that can change based on the selection. This calculation is then also loaded into table A in an Adjustment amount field.
Also, just to make things complicated, I'll have approximately 20 different factors so I thought using different queries would be best to keep it all straight.
Any guidance and examples anyone can provide would be appreciated.
Thanks.
Comment