B
Beth
I have a form (frmWorkers) based on a query combining 2 tables. The form
works great. However, I would like to be able to use a second button on my
switchboard that opens the same form, but only where a checkbox (available)
is checked. The problem is that the form opens with a blank recordset and I
have confirmed that there should be entries.
Any help you can provide is appreciated.
Beth
Here is the code I used on the button on the switchboard.
Private Sub cmdAvailableWorkers_Click()
On Error GoTo Err_Workers
DoCmd.OpenForm "Workers", , , "Forms![Workers]![Available] = True"
DoCmd.Maximize
Exit Sub
Err_Workers:
Select Case (Err)
Case 2603
DoCmd.CancelEvent
DoCmd.SetWarnings (WarningsOff)
X = MsgBox("You do not have access to this feature.", , "Contact
Administrator")
Case Else
X = MsgBox(Err.Description, , "Error")
Exit Sub
End Select
End Sub
works great. However, I would like to be able to use a second button on my
switchboard that opens the same form, but only where a checkbox (available)
is checked. The problem is that the form opens with a blank recordset and I
have confirmed that there should be entries.
Any help you can provide is appreciated.
Beth
Here is the code I used on the button on the switchboard.
Private Sub cmdAvailableWorkers_Click()
On Error GoTo Err_Workers
DoCmd.OpenForm "Workers", , , "Forms![Workers]![Available] = True"
DoCmd.Maximize
Exit Sub
Err_Workers:
Select Case (Err)
Case 2603
DoCmd.CancelEvent
DoCmd.SetWarnings (WarningsOff)
X = MsgBox("You do not have access to this feature.", , "Contact
Administrator")
Case Else
X = MsgBox(Err.Description, , "Error")
Exit Sub
End Select
End Sub