|
| Hi All,
In Access97 I have a form which has a tab control with several tabs but
my issue is with just two of the tabs I'll call them tabSumy and
tabDetail for easy of explaining my issue.
First - tabDetail is bound to tblDetail, its a transactional looking
table like
MKey Category Cost
235486 Food 50.00
235486 Rent 250.00
235486 Travel 75.00
235486 Food 25.00
next mkey etc......
tabSumy is bound to tblEstimatedCost, its field names are the same as
the Category names in tblDetail,
and is summed so it looks like
MKey FoodEst Food RentEst Rent TravEst Travel
235486 100.00 75.00 200.00 250.00 125.00 75.00
next mkey etc......
This db existed already with the tabSumy/tblEstimatedCost, my task is
to add tabDetail/tblDetail and when a user moves from the tabDetail tab
to sum up the values by category for the MKey and update those totals
to the tabSumy/tblEstimatedCost so, what do I need to do?
I think I need sort of crosstab query into a temp table of the
tabDetail data for the MKey and then a Do Loop with an if statement
something to the effect;
myrec = tblDetail, myrec1 = tblEstimatedCost
if myrec!category = myrec1!field.name then
myrec1!field.name.value = myrec!cost
Can a field name be evaluated and matched to something?
if so, can the value for that field name be updated?
anybody got any vb code they want to share that does this? or have any
other idea's as I'm not getting very far very fast with trying to
figure this out.
thanks
bobh.
|
|