SpiritedAway
Registered User.
- Local time
- Yesterday, 21:42
- Joined
- Sep 17, 2009
- Messages
- 97
Hi,
On FrmTrack I have a listbox called [SearchResults] - the row source is:
SELECT [QRYTrack].[TrackID], [QRYTrack].[Status], [QRYTrack].[Percent], [QRYTrack].[System], [QRYTrack].[SystemID], [QRYTrack].[Title], [QRYTrack].[VNumber], [QRYTrack].[Protocol], [QRYTrack].[VersionN], [QRYTrack].[DraftOption] FROM [QRYTrack];
Also on this form, I have a combobox [cbostatusfilter] which gets its info from a lookup table [tblStatus].
I would like to be able to select a status from the combo box to filter data in the listbox only where the status column in my listbox matches.
So far I've used this bit of code to no avail:
Private Sub cbostatusfilter_AfterUpdate()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "SearchResults"
stLinkCriteria = "[Status]=" & "'" & Me![cbostatusfilter] & "'"
Exit_cbostatusfilter_AfterUpdate:
Exit Sub
Could anyone give me some ideas how to do this?
Thanks
Spirited Away
On FrmTrack I have a listbox called [SearchResults] - the row source is:
SELECT [QRYTrack].[TrackID], [QRYTrack].[Status], [QRYTrack].[Percent], [QRYTrack].[System], [QRYTrack].[SystemID], [QRYTrack].[Title], [QRYTrack].[VNumber], [QRYTrack].[Protocol], [QRYTrack].[VersionN], [QRYTrack].[DraftOption] FROM [QRYTrack];
Also on this form, I have a combobox [cbostatusfilter] which gets its info from a lookup table [tblStatus].
I would like to be able to select a status from the combo box to filter data in the listbox only where the status column in my listbox matches.
So far I've used this bit of code to no avail:
Private Sub cbostatusfilter_AfterUpdate()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "SearchResults"
stLinkCriteria = "[Status]=" & "'" & Me![cbostatusfilter] & "'"
Exit_cbostatusfilter_AfterUpdate:
Exit Sub
Could anyone give me some ideas how to do this?
Thanks
Spirited Away
Last edited: