Making a text box visible /invisible

Ants

Registered User.
Local time
Today, 00:30
Joined
Aug 2, 2000
Messages
11
I have created a label in a form that needs to be visible when the invoice due date has been exceeded I have used the following programme in VBA and it does not work. Any suggestions as to why?

Private Sub Form_Current()
If Invoice_Due_Date < Now Then
Dues_outstanding_Label.Visible = True
Else: Dues_outstanding_Label.Visible = False

End If
End Sub

nb
There is another if..then statement before this one within the on current option, would this effect it?

Shall look forward to any suggestions
 
Try this:

Private Sub Form_Current()
If Me![Invoice_Due_Date] <= Date Then
Me![Dues_outstanding_Label].Visible = True
Else: Me![Dues_outstanding_Label].Visible = False

End If
End Sub

Also be sure that you have the names of your Fields spelt correctly and that the format of your Date Field is a date and not text.

Hope this does it for you....

Jack
 
Thanks for that and for the quick reply.
I have an option group that does not work (It was an alphabetical index button)and also a command buttons that proceed to the next records. These too do not function. Is their anything I need to do te rectfy this?
 
DoCmd.GoToRecord, ,acNext should move you to the next record in a form. I would need more specifics on the problem with the Option Group. If it is more convenient email me directly....

HTH,
Jack
 

Users who are viewing this thread

Back
Top Bottom