SQL Inner Join Problem (1 Viewer)

gold007eye

Registered User.
Local time
Today, 18:18
Joined
May 11, 2005
Messages
260
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. :)
 

spikepl

Eledittingent Beliped
Local time
Tomorrow, 00:18
Joined
Nov 3, 2010
Messages
6,142
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
 

gold007eye

Registered User.
Local time
Today, 18:18
Joined
May 11, 2005
Messages
260
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

Top Bottom