By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,491 Members | 3,273 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,491 IT Pros & Developers. It's quick & easy.

Combo Box selection "open" or "closed" filter entire form

gcoaster
P: 91
Hello,

Access is accessing my patience!

how does one filter just one form with a single combo box selection?

I have a combo box named "cboCallStatus" unbound
Row source type = Value List
values; OPEN, CLOSED

Table: tblCALLS has a column named "callStatus" there are some records that are OPEN and some that are CLOSED.

I cannot for the life of me figure out how to filter the form by what is selected in cboCallStatus

I almost got this to work, something i found in a search! hackin it baby!

Expand|Select|Wrap|Line Numbers
  1.  Dim strCboStatus
  2.  With cboSelectableProcess
  3.  'If .ListIndex <> -1 Then
  4.  strCboStatus= .SelText
  5.  Filter = "callStatus=" & strCboStatus
  6.  FilterOn = True
  7.  MsgBox "Filter Applied"
  8.  End If
  9.  End With
  10. End Sub
Dec 13 '07 #1
Share this Question
Share on Google+
1 Reply


gcoaster
P: 91
Got it you guys thanks to Marry! found a post of hers after 3 hours of searching and she supplies a simple answer
http://www.thescripts.com/forum/thre...ters+form.html

here is my solution

Expand|Select|Wrap|Line Numbers
  1. Private Sub cboCallStatus_Click()
  2. currentFilter = "[callStatus] = '" & Me!cboCallStatus & "'"
  3. Filter = currentFilter
  4. DoCmd.ApplyFilter , Filter
  5. End Sub
( I think I woke up the neighborhood again, when I get things to work using vba I cheer like those aussie cricket players when they achieve something after long hours of no action ;^ )

Matt Valencia
Dec 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.