I need to verify if a label (label) exists or not in a report.
Private Sub Report_Open(Cancel As Integer)
On Error GoTo leer_error
aaa Me
leer_error:
End Sub
Function aaa(me1 As Report)
On Error GoTo read
If me1("data") Then
msgbox " exists data"
else
msgbox " NO exists data"
End If
read:
MsgBox Err.Number
End Function
this code generate of error 2462. in the report it has many fields of table. but depending if I put one or another one it must do a thing or another one.
Private Sub Report_Open(Cancel As Integer)
On Error GoTo leer_error
aaa Me
leer_error:
End Sub
Function aaa(me1 As Report)
On Error GoTo read
If me1("data") Then
msgbox " exists data"
else
msgbox " NO exists data"
End If
read:
MsgBox Err.Number
End Function
this code generate of error 2462. in the report it has many fields of table. but depending if I put one or another one it must do a thing or another one.