I have some problems with form updates, and I need to know where to run the macros to make sure everything is up to date.
So for example, at the moment I have a price in a text box and the words "+Tax" in a label next to it. Above this I have a tick box to toggle this (some sale prices include tax and some don't). So when the tick box is checked the words +Tax appear next to the price and when the box is unchecked it disappears. That works fine - the problem is in my edit form, when I am scrolling through records, the label does not disappear and reappear properly with the label. I have a macro that checks the status of the check box and updates the labels visibility accordingly, but I cannot figure out where to put it to make it work properly. I have tried running the macro in just about every field for the form, but it never does anything. I also tried applying it to the actual record navigation buttons in "Mouse Up", but it seems that mouse up runs before "On Click" (which is where the code to change records is) because when I did this it always updated the labels visibility BEFORE changing the record, so it showed the correct "+TAX" for the previous record I was viewing.
So I need the macro to run when the value of this tick box changes (already done) AND when the record being viewed changes, but it needs to be updated AFTER the record has been loaded. I would also settle for just getting it to run the macro on ANY update to the form.
It might only seem like a tiny thing, but later I am going to have a check box which makes an entire section of the form appear and disappear, so I need to make sure it works.
So for example, at the moment I have a price in a text box and the words "+Tax" in a label next to it. Above this I have a tick box to toggle this (some sale prices include tax and some don't). So when the tick box is checked the words +Tax appear next to the price and when the box is unchecked it disappears. That works fine - the problem is in my edit form, when I am scrolling through records, the label does not disappear and reappear properly with the label. I have a macro that checks the status of the check box and updates the labels visibility accordingly, but I cannot figure out where to put it to make it work properly. I have tried running the macro in just about every field for the form, but it never does anything. I also tried applying it to the actual record navigation buttons in "Mouse Up", but it seems that mouse up runs before "On Click" (which is where the code to change records is) because when I did this it always updated the labels visibility BEFORE changing the record, so it showed the correct "+TAX" for the previous record I was viewing.
So I need the macro to run when the value of this tick box changes (already done) AND when the record being viewed changes, but it needs to be updated AFTER the record has been loaded. I would also settle for just getting it to run the macro on ANY update to the form.
It might only seem like a tiny thing, but later I am going to have a check box which makes an entire section of the form appear and disappear, so I need to make sure it works.