M
MEAD5432
I have a database to track workorders and a form with a drop down menu to
sort by employee name in a subform.
The workorder ID is set so that a user can double click the workorder number
and it opens up the workorder form. The problem is, I don't know how to get
it to open to the specific workorder number. Instead, it opens all
workorders.
Here is the coding I have set up for the double click event:
Private Sub Workorder_ID_DblClick(Cancel As Integer)
On Error GoTo Err_Workorder_ID_DblClick
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Workorder Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Workorder_ID_DblClick:
Exit Sub
Err_Workorder_ID_DblClick:
MsgBox Err.Description
Resume Exit_Workorder_ID_DblClick
End Sub
I am a novice at VBA so I am probably just missing something really easy.
Any suggestions?
I am building the DB in Office 2003 on XP Pro. All programs are fully
updated.
sort by employee name in a subform.
The workorder ID is set so that a user can double click the workorder number
and it opens up the workorder form. The problem is, I don't know how to get
it to open to the specific workorder number. Instead, it opens all
workorders.
Here is the coding I have set up for the double click event:
Private Sub Workorder_ID_DblClick(Cancel As Integer)
On Error GoTo Err_Workorder_ID_DblClick
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Workorder Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Workorder_ID_DblClick:
Exit Sub
Err_Workorder_ID_DblClick:
MsgBox Err.Description
Resume Exit_Workorder_ID_DblClick
End Sub
I am a novice at VBA so I am probably just missing something really easy.
Any suggestions?
I am building the DB in Office 2003 on XP Pro. All programs are fully
updated.