Access form fileds update

  • 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

  • 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

  • Thank you PrrofOfLife I will try that scenario

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply