Results 1 to 3 of 3
  1. #1
    thadius856 is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Posts
    15

    Passing Navigation Combobox ID to Listbox Query?


    My form has a combo box for navigation. I accepted the wizard's output because it seems to work just fine without requiring fiddling.

    cboJumpRecord:


    Lower in the form, I have a listbox for showing past transactions on that item. It uses a query as its rowsource. Right now it shows ALL records in the transactions table. I'd like it to show only the entries for the current record.

    I figured this would be as easy as adding a criteria to the query...

    Field: MediaItemID
    Table: tblMediaItems
    Criteria: [Forms]![View Library]![cboJumpRecord]

    ...but of course that returns no results.

    I've fumbled around with it for hours, but not finding any combo that returns results. Where am I going wrong?
    Last edited by thadius856; 08-10-2015 at 06:47 AM.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    You are describing combo and/or list boxes. http://www.datapigtechnologies.com/f...combobox2.html

    Listbox RowSource:

    SELECT fieldname FROM tablename WHERE somefield=[cboJumpRecord];

    Then need code to requery the listbox. Try the combobox AfterUpdate event.

    Me.listboxname.Requery
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    thadius856 is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Posts
    15
    Ahhh. I'd already done everything except put in the requery.

    Thanks!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-10-2012, 11:21 PM
  2. Replies: 2
    Last Post: 05-17-2012, 11:19 AM
  3. passing openArg to a listbox on other form
    By focosi in forum Access
    Replies: 7
    Last Post: 08-12-2011, 04:27 PM
  4. Replies: 1
    Last Post: 03-24-2010, 08:42 AM
  5. Passing specific Combobox info to a query
    By pwdpwd in forum Queries
    Replies: 1
    Last Post: 02-09-2010, 12:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums