Results 1 to 3 of 3
  1. #1
    tonycl69 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    102

    Listing data not associated with a combobox selection


    Hi guys, I have a vehicle service database, of which different locations look after certain contracts of vehicles. I have a combobox that selects a location and then a report is produced and lists all vehicles to that location. How do I list all other items not associated with a location if I choose not to select anything from the combobox?

    I'm open to questions and suggestions cheers.

    Tony

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    The report, normally, shows Everything.
    When user picks from the combo, filter it.....
    Code:
    if IsNull(cboDept) then 
        Docmd.openReport "rVehicleRpt", acPreview
    else
       Docmd.openReport "rVehicleRpt", acPreview,"[dept]='" & cboDept & "'"
    end if
    my commas may be off.

  3. #3
    tonycl69 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    102
    Thanks for your reply I'll put that into effect see how I get on

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

Similar Threads

  1. Replies: 1
    Last Post: 03-01-2016, 06:05 AM
  2. Replies: 2
    Last Post: 08-22-2014, 01:20 PM
  3. Replies: 4
    Last Post: 02-09-2012, 03:03 AM
  4. ComboBox not listing multiple columns
    By tylerg11 in forum Forms
    Replies: 3
    Last Post: 09-26-2011, 11:24 AM
  5. ComboBox not listing values
    By tylerg11 in forum Access
    Replies: 1
    Last Post: 09-23-2011, 10:28 AM

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