ansentry
Access amateur
- Local time
- Tomorrow, 09:08
- Joined
- Jun 1, 2003
- Messages
- 995
I am using access 97
Can anyone see what may be wrong with this code, sometimes it works and other time not.
If the record count is greater that 2 the header will say Vehicle NOT Returned, then if switch to design view and then back it will say Vehicles Not Returned (which is correct).
This is not very important in however it has got me beaten.
The reason for HeaderA_Label and HeaderB_Label is so that the text has a shadow effect.
I someone can offer advise then I would be grateful.
Private Sub Form_Open(Cancel As Integer)
If Me.RecordsetClone.RecordCount >= 2 Then
Me.HeaderA_Label.Caption = "Vehicles NOT Returned"
Me.HeaderB_Label.Caption = "Vehicles NOT Returned"
Me.Caption = "Vehicles Not Returned"
Else
Me.HeaderA_Label.Caption = "Vehicle NOT Returned"
Me.HeaderB_Label.Caption = "Vehicle NOT Returned"
Me.Caption = "Vehicle Not Returned"
End If
End Sub
Can anyone see what may be wrong with this code, sometimes it works and other time not.
If the record count is greater that 2 the header will say Vehicle NOT Returned, then if switch to design view and then back it will say Vehicles Not Returned (which is correct).
This is not very important in however it has got me beaten.
The reason for HeaderA_Label and HeaderB_Label is so that the text has a shadow effect.
I someone can offer advise then I would be grateful.
Private Sub Form_Open(Cancel As Integer)
If Me.RecordsetClone.RecordCount >= 2 Then
Me.HeaderA_Label.Caption = "Vehicles NOT Returned"
Me.HeaderB_Label.Caption = "Vehicles NOT Returned"
Me.Caption = "Vehicles Not Returned"
Else
Me.HeaderA_Label.Caption = "Vehicle NOT Returned"
Me.HeaderB_Label.Caption = "Vehicle NOT Returned"
Me.Caption = "Vehicle Not Returned"
End If
End Sub