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

Code:
strSQL = "Select * INTO " & TableName & " FROM [Letter Information] WHERE ([Letter Information].ID)=" & Forms![Search Form]![SID] & ";"

And on a side tid-bit I tried for kicks and giggles.. (Removed the space after the WHERE (" and code still works ;)

Code:
Select * INTO zzpzdc FROM [Letter Information] WHERE ([Letter Information].ID)=123351;
Select * INTO zzpzdc FROM [Letter Information] WHERE ([Letter Information].ID)=139961;
Select * INTO zzpzdc FROM [Letter Information] WHERE([Letter Information].ID)=111382;

Thanks for all of your help. :)
 
And I was just about to beat myself over my masochistic tendencies :)

PS: Just because you got away with no space after WHERE here, does not mean that that always works:)
And btw, if you remove the ";" it will still work with DoCmd.RunSQL
 
And btw, if you remove the ";" it will still work with DoCmd.RunSQL

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 it to, but I was wrong, because of the way my Search Form works it pulls from the query I was trying to INNER Join on and therefore was a mute point. lol
 

Users who are viewing this thread

Back
Top Bottom