That sounds very odd. It may have something to do with the ID being on a sub form.
Add a the code in red below and next time it plays up open the vba code window (Press Alt+F11) ,
then look in the immediate window (Press Ctrl+G) to see what it thinks sWhere was at the time.
Code:
Private Sub GenerateWorkOrder_Click()
Dim sWhere As String
Dim iMyID As Long
'tblWorkOrder Subform
iMyID = Me.[tblWorkOrder Subform]![Work Order No]
sWhere = "[Work Order No] = " & iMyID
Debug.Print sWhere
DoCmd.OpenReport "rptWorkOrder", acViewPreview, , sWhere
End Sub