Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Concatenate function 1

Status
Not open for further replies.

Dirtbike

IS-IT--Management
Dec 9, 2002
81
US
I originally posted on the FORMs page...my bad.
Some kind person pointed me toward Duane's super-duper Concatenate() code. Thanks.

I'm getting the dreaded data type missmatch in criteria.
Here is my SQL:
SELECT tn_p1.SONumber, Concatenate("SELECT tn FROM tn_p1 WHERE SONumber = " & [SONumber]) as Notes
FROM tn_p1
WHERE (((tn_p1.SONumber)="00100211678"));

I have verified I'm ADO. The debug points to a problem here:

rs.Open pstrSQL, CurrentProject.Connection, _
adOpenKeyset, adLockOptimistic

I tried DAO and also crash on datatype missmatch although it points more directly to the pstrSQL. Thanks for the help.
 
SELECT tn_p1.SONumber, Concatenate("SELECT tn FROM tn_p1 WHERE SONumber ='" & [SONumber] & "'") as Notes
FROM tn_p1
WHERE SONumber='00100211678';

SONumber looks like of text data type
 
That is CORRECT!...so, I'll try your code and hollor again if it doesn't work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top