Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2010
    Posts
    17

    Unanswered: Filter By Form Report (combobox issue)

    I found the filter by form VB code here:
    ACC2000: How to Filter a Report Using a Form's Filter

    when I filter using a textbox value it works fine, builds a report. but when i use a combobox, it will prompt me to return the value's ID number, i want this to be automatically inputted.

    ex
    i have a combo box field called asset type (laptops, desktop, Server.....)
    if i choose laptop, it will return "laptop" for the filter, but the report needs the AssettypeID (which is an integer)

    do i need to build some code that will return the Integer ID if a combo box is being used for the filter?

  2. #2
    Join Date
    Jan 2009
    Location
    Kerala, India
    Posts
    183

    Filter By Form Report (combobox issue)

    Take a look at the Combo-box usage and how to extract column value other than the bound column:

    LEARN MS-ACCESS TIPS AND TRICKS Blog Archive Combo-Box Column Values
    www.MsAccessTips.com (Learn MS-Access Tips & Tricks)
    Learn Advanced MS-Access Programming with sample VBA Code.

    All responses are based on Access 2003/2007

  3. #3
    Join Date
    May 2010
    Posts
    601
    Quote Originally Posted by mike.burns7 View Post
    I found the filter by form VB code here:
    ACC2000: How to Filter a Report Using a Form's Filter

    when I filter using a textbox value it works fine, builds a report. but when i use a combobox, it will prompt me to return the value's ID number, i want this to be automatically inputted.

    ex
    i have a combo box field called asset type (laptops, desktop, Server.....)
    if i choose laptop, it will return "laptop" for the filter, but the report needs the AssettypeID (which is an integer)

    do i need to build some code that will return the Integer ID if a combo box is being used for the filter?
    What is the bound column?
    Sounds like it needs to be the column index for the field AssettypeID in the combo box's row source.
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  4. #4
    Join Date
    Apr 2010
    Posts
    17
    i attached a screen shot of my combo box's properties.
    Attached Thumbnails Attached Thumbnails snap.jpg  

Posting Permissions

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