Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combo Box (Filter With Combo Box)

    I'm having a problem with using a Combo Box to filter for records in my table; I using the "after update" function. But after I select the value form the combo box noting happens. I used Line #1 Me.Filter = "[FY4] = '" & Me![cmbxFFY4] & "'" and line 2 Me.FilterOn = True.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo Box (Filter With Combo Box)

    Can you provide some details about your combo box? Thanks

    From the Format tab of the Properties window:
    - Column Count
    - Column Widths
    From the Data tab:
    - Control Source
    - Row Source Type
    - Row Source
    - Bound Column

  3. #3
    2 Star Lounger
    Join Date
    Jul 2003
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box (Filter With Combo Box)

    From the Format tab of the Properties window:
    - Column Count = 1
    - Column Widths = Blank
    From the Data tab:
    - Control Source = FY4
    - Row Source Type = Table/Query
    - Row Source = SELECT tblFY4.FFY4 FROM tblFY4;
    - Bound Column = 1

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo Box (Filter With Combo Box)

    If you want the combo box to filter your form, it should be unbound, i.e. its Control Source should be blank. If it is bound to the field FY4, selecting a value in the combo box will change the value of FY4 for the current record. So you probably need 2 combo boxes: a bound one to let the user select a value for FY4 in the current record, and an unbound one to let the user filter the form.

  5. #5
    2 Star Lounger
    Join Date
    Jul 2003
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box (Filter With Combo Box)

    Thanks the reason I wanted the Control Source to be FY4 so that I don't need two boxes; this form is used just to retrieve info. No need to add or modify the table. How do you get the combo box to display the first value of the table?

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo Box (Filter With Combo Box)

    Make sure that the Control Source is blank, and set the Default Value property of the combo box (in the Data tab of the Properties window) to

    =[cmbxFFY4].[ItemData](0)

    The list items are counted starting at 0, so ItemData(0) is the first item in the list.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •