Results 1 to 11 of 11
  1. #1
    seanpbent is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Posts
    7

    Select Query isn't working

    So I have a select query with a criteria [Forms]![LookupForm]![Combo8] for field ProjectLocation. When the combo box is filled in and I run the query, it still asks me to input the parameter value separately. Every other time I've done this type of select query I haven't run into any problems. So, can anyone help me?

    Also, I'm running Access 2013, not 2010.

  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,771
    Usually means Access can't find the referenced item. Make sure names are spelled correctly.

    I NEVER use dynamic parameterized query. I prefer to apply filter to forms and reports. Review: http://www.allenbrowne.com/ser-62.html
    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
    seanpbent is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2013
    Posts
    7
    Everything is spelled correctly. I've checked like 100 times. Could it be anything else?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Maybe. If you want to provide db for analysis, follow instructions at bottom of my post.
    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.

  5. #5
    seanpbent is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2013
    Posts
    7
    Okay, I did that and it worked. The relevant form is "LookupForm". The relevant queries are "Location_Lookup" and "Location_Select". The relevant tables are "Location" and "ER Log".
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Which query?

    Can't test query because tables are linked and you did not provide backend. Again, if you want to ...
    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.

  7. #7
    seanpbent is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2013
    Posts
    7
    I don't have it linked to a change event yet. I've just been running the query manually.
    Attached Files Attached Files

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Which query?
    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.

  9. #9
    seanpbent is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2013
    Posts
    7
    Location_Lookup

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I give up. I tried deleting and recreating and renaming combobox. Only possibility I can come up with is corruption.

    You have Location and [ER Log] tables linked on primary key fields. [Log #] must be unique in both tables. This means the tables have a 1-to-1 relationship. In which case, why bother with 2 tables?

    I NEVER use dynamic parameter in query. I recommend using the WHERE CONDITION argument of OpenForm method - in macro or VBA.

    Also recommend no spaces or special characters/punctuation (underscore is exception) in naming convention. Better would be LogNum or LogNo or Log_Num.
    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.

  11. #11
    seanpbent is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2013
    Posts
    7
    Alright, thanks for your help.

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

Similar Threads

  1. Replies: 3
    Last Post: 08-02-2014, 02:24 PM
  2. Replies: 2
    Last Post: 08-26-2013, 11:29 AM
  3. Sleepless Combo Select not working on form
    By MadeCurler in forum Forms
    Replies: 8
    Last Post: 11-09-2012, 01:05 PM
  4. OrderBy Not working for select few cases
    By walter189 in forum Programming
    Replies: 2
    Last Post: 08-19-2011, 05:53 AM
  5. SELECT DISTINCT not working
    By johnmerlino in forum Queries
    Replies: 2
    Last Post: 10-25-2010, 06:48 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