Recent content by gold007eye

  1. G

    SQL Inner Join Problem

    That's good to know. I figured with the craziness that I needed to accomplish for security reasons the strSQL would work for the multiple instances of it's use depending on the scenario. But I did learn that this whole time I thought I needed the INNER JOIN for this to work they way I needed...
  2. G

    SQL Inner Join Problem

    HOLY Explicit!!! Ok.. I FINALLY got it figured out and didn't even need INNER JOIN. :D Here is the code that worked strSQL = "Select * INTO " & TableName & " FROM [Letter Information] WHERE ([Letter Information].ID)=" & Forms![Search Form]![SID] & ";" And on a side tid-bit I tried for...
  3. G

    SQL Inner Join Problem

    Tried that as well.. once I get rid of brackets it goes back to Parameter error. :(
  4. G

    SQL Inner Join Problem

    once I add make them equal whether it be ((( ))) or (( )) or ( ) I get the parameter error "expected 1"
  5. G

    SQL Inner Join Problem

    1st piece: Error 3075 - syntax error in query expression ((([Letter Information].ID=[Forms]![Search Form]![SID])); Code: strSQL = "Select * INTO zzpzdc FROM [Letter Information] WHERE ((([Letter Information].ID=[Forms]![Search Form]![SID]));"
  6. G

    SQL Inner Join Problem

    Working on that now.. to see what happens.
  7. G

    SQL Inner Join Problem

    Using this code I was able to get a "Make Table" query to do what I was trying... SELECT * INTO zzpzdc FROM [Letter Information] WHERE ((([Letter Information].ID)=[Forms]![Search Form]![SID])); Still need to get this to happen using "strSQL" as that creates the table name based on the users...
  8. G

    SQL Inner Join Problem

    Correct. Field names etc match.
  9. G

    SQL Inner Join Problem

    When I pasted that code into a query and ran it it came back with the 1 record that matched ID 107892. And if I do it as SELECT * FROM [Letter Information] INNER JOIN [Letter Search - Query] ON [Letter Information].ID = [Letter Search - Query].ID WHERE ((([Letter...
  10. G

    SQL Inner Join Problem

    It looks like with or without the "INTO" statement it is grabbing the data I need; just erroring out and not creating the table and putting the data into that table. Only other thing I can think of is this is also the only SQL statement I am using that is looking at a table and a query to match...
  11. G

    SQL Inner Join Problem

    Update: I copy and pasted the code you showed me and still getting error 3061 Too Few parameters. Expected 9. ElseIf Screen.ActiveControl.Name = "Print" Then strSQL = "SELECT * INTO " & TableName & " FROM [Letter Information] INNER JOIN [Letter Search - Query] ON [Letter...
  12. G

    SQL Inner Join Problem

    Ok.. here is what I tried and result: strSQL = "SELECT * FROM [Letter Information] INNER JOIN [Letter Search - Query] ON [Letter Information].ID = [Letter Search - Query].ID WHERE " _ & "((([Letter Information].ID)=" & Forms![Search Form]![SID] & "));" Immediate Window: SELECT * FROM...
  13. G

    SQL Inner Join Problem

    Funny thing is all the other SQL statements are working perfectly. Just this dern Inner Join one that isn't. I added the space with the WHERE statement and it actually made no difference to the error. Does the fact that I am writing this in a Module as a Function have any bearing on the code...
  14. G

    SQL Inner Join Problem

    Sorry wasn't trying to bury you. I did try removing the " " before from the ID; then no ID value was being returned in the immediate window. I will re-write with what you are asking and let you know the results.
  15. G

    SQL Inner Join Problem

    Arrrghh.. This is driving me bonkers. :( Still getting parameter error. Here is the full code that I'm using. I'm not sure if this will help. Also having it look at a form for the value shouldn't be causing any problems correct? I tried removing the "INTO" code and get the same results...
Top Bottom