Hello guys!
Can you help me this type of error?
Run-time error '8574':
The object 'Employee ID:' was not found
This is the code:
Private Sub cmdPreview_Click()
Dim rsq As New Recordset
rsq.Open "SELECT * FROM qRecord where EmpID = " & Val(txtEmpID.Text) & "", con, adOpenStatic, adLockReadOnly, addUnknown
If rsq.EOF = False Then
MsgBox "No records to view.", vbInformation, "No Records"
Else
With drTrans.Sections(2)
.Controls(Label1.Caption) = rsq.Fields("EmpID")
.Controls(Label2.Caption) = rsq.Fields("LastName") & "," & rsq.Fields("FirstName")
.Controls(Label3.Caption) = rsq.Fields("Position")
End With
Set drTrans.DataSource = rsq
drTrans.Show
End If
End Sub