Hey All,
Complete newb here but really giving it a go. I have about 40 hours of Access training now but I'm running into some complications with a program I'm trying to build.
I have to calculate some estimations on a series of different data categories.(fields) I've been able to use a button that fires off a series of queries searching for strings and then updating the field with values. My question is, instead of building 15 queries to search for *string*, then updating table.field * value, can I just build a definition table that houses the string name in one field and daily value associated to it in another field, then run a query to search for that value and update based on the value and its daily rate?
This is probably too vague but I'll try to explain further. Lets say you need to calculate a class cost based on a location. In the class cost field, you want it to reflect $500 for a five day class because the facility that the class is hosted at is $100 a day. Only, you have hundreds of facilities with different daily rates. Is there a way to fire off a query to search for a class location description(string), then take the value of that class locations daily rate and muiltiply it by the length of the class and populate the estimated value in a different field called location cost? Can this be done with a query or is it best handled using vba?
Right now I have several queries that have a list of *string* values it searches for. Once it finds the string, I have it taking a hard coded value and multiplying it by tableclass.length and placing the total value in the location cost field. Rather than having 15 queries to accomodate to 150 different location strings and values, I was thinking it would be easier to build a table of all the class locations, their associated daily rates, then firing off a SQL statement / query to do the work. That way I can later build a form in case those daily values change so that they can be easily updated vs. hardcoding 15 queries again.
Any help would be appreciated.