By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,131 Members | 1,494 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,131 IT Pros & Developers. It's quick & easy.

Updating data in a tab control

P: n/a
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! then
myrec1! = 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.

Apr 7 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.