Ok I tried the vb below and am getting a to few parameters. Expected 1 error and debug takes me to:
Set rs = db.OpenRecordset("qryAssociatedEmpSup", dbOpenSnapshot)
Here is the VBA Im trying... what am Idoing wrong?
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim intX As Integer
Dim strMissnData As String
Dim lastemployee As String
Set db = CurrentDb()
Set rs = db.OpenRecordset("qryAssociatedEmpSup", dbOpenSnapshot)
With rs
.MoveLast: .MoveFirst: intX = .RecordCount
lastemployee = .Fields("employeesname")
strMissnData = .Fields("EmployeesName") & vbCr
Do Until .EOF
If Trim(lastemployee) <> Trim(.Fields("employeesname")) Then
strMissnData = strMissnData & .Fields("EmployeesName") & vbCrLf
End If
lastemployee = .Fields("employeesname")
.MoveNext
Loop
End With
If chkStatus = True Then
If vbYes = MsgBox("Are you sure you wish to change supervisors status to INACTIVE?" & vbCrLf & vbCrLf _
& "If so then you have to adjust employees associated with this supervisor," & vbCrLf _
& "because thier name will not show up in any list untill you do." & vbCrLf _
& strMissnData, _
vbYesNo + vbQuestion, "Set to Active?") Then
Else
Me.chkStatus = False
Me.Requery
End If
Else
If chkStatus = False Then
If MsgBox("Are you sure you want to change the supervisors status to ACTIVE?", vbQuestion + vbYesNo, "Set to InActive?") = vbYes Then
Me.Requery
Else
Me.chkStatus = True
Me.Requery
End If
End If
End If
rs.Close
Set rs = Nothing
Set db = Nothing