SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Access form fileds update


Access form fileds update

Author
Message
aa.nichol
aa.nichol
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 Visits: 53
Dear all

I have a form with 10 Yes/No fields and below each column of 5 I count up all fields that have a tick in them. This works fine when I add Sendkeys "{F9}" for each field. I tick a field, F9 is sent and the calcualtion is done.

Is there something that I can add to the form rather than each field which will update the form and re-calculate the count, insted of appying the F9 to each field. In the end, there will be about 50 Yes/No fields and I do not want to do 50 F9's.

Thanks
ProofOfLife
ProofOfLife
SSC Veteran
SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)

Group: General Forum Members
Points: 294 Visits: 9474
Hi

If I have understood your problem correctly, you could use a combination of the AfterUpdate event of each control and a hidden control(s) on the form. (An alternative to the hidden control is a form level variable but I like the hidden control as you can unhide it while you are developing so you can check its behaviour.)

In the AfterUpdate event you could test for True/False value and increase/decrease the count accordingly.

If you want to avoid some repetitous code, you could call a function from each AfterUpdate event. But I would suggest you do this as an enhancement after you have the basic functionality working.

I hope this assists you with your problem. Post back if you have some further specific questions.

Cheers

Rowan
aa.nichol
aa.nichol
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 Visits: 53
Thank you PrrofOfLife I will try that scenario
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search