Results 1 to 4 of 4
  1. #1
    Ryan is offline Novice
    Windows Vista Access 2003
    Join Date
    Aug 2009
    Location
    Lafayette LA 70592
    Posts
    26

    Question Criteria from Combobox dont work.

    Well, Toptech posted he wanted a simple database. I figured I should try help and make it for him, to help me learn access better. Its going good, but came across a odd problem.

    I made a Customer Query. In the Query I put two critieria options to pull from Combo boxes (dropdown) on a Customer Search Form. If I run the query ((From the Query List:Not a command box or Form)), it ask for the parameters, I put in the data. It works. The two parameters it ask for is First and Last name.

    But if the Customer Search Form is open, the query just displays blank data.

    The data is displayed on a SubForm -as in the form of a Datasheet so that it may pull the data from the query. I did this recently on another database and it works fine.

    [Forms]![SearchCustomers]![combo10]
    [Forms]![SearchCustomers]![combo12]

    this is how I entered the critieria in the Query.



    Any Ideas?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Referencing a SubForm is different than referencing a MainForm. It is not in the Forms collection. http://www.mvps.org/access/forms/frm0031.htm

  3. #3
    Ryan is offline Novice
    Windows Vista Access 2003
    Join Date
    Aug 2009
    Location
    Lafayette LA 70592
    Posts
    26
    The comboboxes are on the MainForm. You actually told me how to do it, And successfully did it for someone else. It worked great, I tried to copy the same procedure, with bad results. 2 Comboboxes on main form.

    I tried to just put one combo box (last name) , changed it in the critieria for the query aswell. Still with the same result.

    If I run the Query, I input a last name, if the name is in the table, the query displays with the correct result.

    So when I open the MainForm, with the combobox. I select a name and run the query. I get no results.

    The data displays on a subform, the way you told me. It works great on the other database.

    Now if I run the Query, With the Main Form open. I get Null results, and it dont ask for the parameters.
    PS. I checked spelling over and over, Even used copy and paste to make sure it wasnt a typing error.

    *Stumped*

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It is probably time to post your db so we can look at it.

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

Similar Threads

  1. ComboBox Row Source Value
    By mpbertha in forum Forms
    Replies: 1
    Last Post: 08-21-2009, 06:34 AM
  2. VBA Code To Work With MySQL
    By botts121 in forum Programming
    Replies: 0
    Last Post: 07-08-2009, 08:51 AM
  3. Forms don't work the same
    By hawzmolly in forum Access
    Replies: 0
    Last Post: 12-18-2008, 05:46 PM
  4. Can't get TransferSpreadsheet to work
    By Valeda in forum Import/Export Data
    Replies: 0
    Last Post: 07-19-2007, 08:04 AM
  5. Nested IIf query will not work
    By ddog171 in forum Queries
    Replies: 1
    Last Post: 06-20-2006, 02:03 PM

Tags for this Thread

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