testdba
Registered User.
- Local time
- Today, 07:26
- Joined
- Dec 16, 2004
- Messages
- 26
I am trying to use the double click event of a listbox to open a form to a specific record. The problem I have is when I double click a record, Access pops up a box asking for PONumber (which is in column 0 of the listbox).
Here is the code that I am using:
I'm sure it's a syntax error on the "strLinkCriteria = "[PONumber]=" & Me.lstPOInfo.Column(0)" line.
Here is the code that I am using:
Code:
Private Sub lstPOInfo_DblClick(Cancel As Integer)
Dim boStatus As Boolean
Dim strDocName As String
Dim strLinkCriteria As String
strDocName = "Orders"
' function checks to see if the form is open or not
boStatus = fIsLoaded(strDocName)
If boStatus = True Then
strLinkCriteria = "[PONumber]=" & Me.lstPOInfo.Column(0)
Forms![Orders].FilterOn = True
Forms![Orders].Filter = strLinkCriteria
Else
strLinkCriteria = "[PONumber]=" & Me.lstPOInfo.Column(0)
DoCmd.OpenForm strDocName, , , strLinkCriteria
End If
End Sub
I'm sure it's a syntax error on the "strLinkCriteria = "[PONumber]=" & Me.lstPOInfo.Column(0)" line.
Last edited: