Results 1 to 2 of 2
  1. #1
    pharmacologist is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2019
    Posts
    39

    Query works for one table not for another, not sure why

    This query works find when I call it for one table but for another table from excel. I get "no value given for one or more required parameters".

    SQLStr = "SELECT " & table & "." & "[" & recordlabel & "], " & table & "." & "[" & returnvalue & "]" & " FROM " & table & " WHERE (((" & table & ".[" & recordlabel & "]) = " & recordid & "));"

    Both tables exist and the fields I reference exist so I'm not sure what the problem is.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Here's a commonly used method to debug things like this:

    http://www.baldyweb.com/ImmediateWindow.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 8
    Last Post: 05-08-2018, 07:27 AM
  2. Replies: 4
    Last Post: 01-06-2016, 10:32 AM
  3. Replies: 1
    Last Post: 06-21-2015, 07:58 AM
  4. Replies: 7
    Last Post: 12-31-2013, 04:50 PM
  5. Replies: 1
    Last Post: 10-20-2009, 02:05 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