Hi, Im relatively new to writing code in VBA for Microsoft Access and have come across a slight problem.
I need to run two OnCurrent event procedures in a form I have created. I currently have:
Private Sub Form_Current()
If Me.ExpiryDate < Date Then
Me.ExpiryDate.ForeColor = vbRed
Else
Me.ExpiryDate.ForeColor = vbBlack
End If
End Sub
This is so the expiry dates in the form show up as red. However I also need the following code to run as an OnCurrent Event Procedure.
Private Sub Form_Current()
On Error Resume Next
Me![Imageframe].Picture = Me![Photo]
End Sub
This will set seperate images in my form. How do I combine both of these into One OnCurrent event?
Thanks!
I need to run two OnCurrent event procedures in a form I have created. I currently have:
Private Sub Form_Current()
If Me.ExpiryDate < Date Then
Me.ExpiryDate.ForeColor = vbRed
Else
Me.ExpiryDate.ForeColor = vbBlack
End If
End Sub
This is so the expiry dates in the form show up as red. However I also need the following code to run as an OnCurrent Event Procedure.
Private Sub Form_Current()
On Error Resume Next
Me![Imageframe].Picture = Me![Photo]
End Sub
This will set seperate images in my form. How do I combine both of these into One OnCurrent event?
Thanks!