Weird problem when setting label to show or hide

B

Bagger

I have a main form set up with tabs. On one of the tabs, I have a form that
has 2 subforms. Now everything else with these subforms seems to be working
fine. They are just continuous forms that show a list of invoices, and
invoice details. However, I added a label to the bottom of the 2nd subform
(the invoice detail) that is supposed to show if the total value of the
detail records do not match the invoice total from the parent invoice record
(which has a value field of its own at the client's request).

Here's the weird part. I noticed that the label was showing up sometimes
when it looked like the values matched. So I decided to step through the
code and see what was going on. I put a break on the If statement line and
watched it when I selected one of the problematic invoices. I would just hit
F8 or F5 to step through it and it seemed to be working fine. I'd watch on
the form and it would be correct as long as I had the break there. When I
remove the break, it shows up when it shouldn't again. I have no idea why
that happens. Can anyone clue me in to what might be going on? Thanks!
 
S

Steve Schapel

Bagger,

It sounds like a screen drawing problem. Try putting a line in your
code like this:
Me.Repaint
.... straight after the code that modifies the display of the label.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top