Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Access form fileds update Expand / Collapse
Author
Message
Posted Thursday, February 2, 2012 1:18 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, March 25, 2014 2:44 AM
Points: 18, 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
Post #1246072
Posted Thursday, February 2, 2012 1:48 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, July 21, 2014 4:34 PM
Points: 48, Visits: 9,470
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
Post #1246099
Posted Thursday, February 2, 2012 2:30 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, March 25, 2014 2:44 AM
Points: 18, Visits: 53
Thank you PrrofOfLife I will try that scenario
Post #1246129
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse