I have a form with some buttons that take the user to reports, other forms, etc. On this form the user can see how many products are missing costing and pricing information, through some textboxes that i have designed with some code. The problem is that when the user opens another form, modifies products and comes back to the original form (which remains OPEN) the "status" of the missing products remain the same.
In other words, i cant find the way to refresh/requery the form and textboxes so that it checks again if products are missing. Ive tried different events with no luck...the missing products only reflect changes if the form is CLOSED AND OPENED again.
the current code is:
Expand|Select|Wrap|Line Numbers
- Private Sub Form_Load()
- Me.costingmissingtxt.Requery
- Me.pricingmissingtxt.Requery
- If Me.costingmissingtxt.Value >= 1 Then
- Me.missingtxt.Visible = True
- Me.missingtxt.ForeColor = 255:
- Me.costingmissingtxt.Visible = True
- Me.oktxt.Visible = False
- Me.costingmissingtxt.ForeColor = 255
- Me.missingtxt.Value = "MISSING:"
- Else
- Me.costingmissingtxt.Visible = False
- Me.missingtxt.Visible = False
- Me.oktxt.Visible = True
- Me.oktxt.ForeColor = 65280:
- Me.oktxt.FontBold = True
- Me.oktxt.Value = "OK"
- End If
- If Me.pricingmissingtxt.Value >= 1 Then
- Me.missing2txt.Visible = True
- Me.missing2txt.ForeColor = 255:
- Me.pricingmissingtxt.Visible = True
- Me.ok2txt.Visible = False
- Me.pricingmissingtxt.ForeColor = 255
- Me.missing2txt.Value = "MISSING:"
- Else
- Me.pricingmissingtxt.Visible = False
- Me.missing2txt.Visible = False
- Me.ok2txt.Visible = True
- Me.ok2txt.ForeColor = 65280:
- Me.ok2txt.FontBold = True
- Me.ok2txt.Value = "OK"
- End If
Thanks,
Gilberto