ClaraBarton
Registered User.
- Local time
- Today, 06:22
- Joined
- Oct 14, 2019
- Messages
- 754
When a variable is a string, the following adds quotes to it:
	
	
	
		
It looks like this:  
UPDATE tblItems SET ITPath ='1 < 2', Item ='(New)', InUse =True WHERE 'flocID = 7 And DocNo = 1';
This is the formula:
	
	
	
		
I can remove the quotes from (New) but how do I handle {0} and {3}?
 
		Code:
	
	
	strSql = StringFormatSQL("UPDATE tblItems" & _
                                " SET ITPath={0}," & _
                                " Item={1}," & _
                                " InUse={2}" & _
                                " WHERE {3};", _
                                strITPath, "(New)", True, strCriteria)UPDATE tblItems SET ITPath ='1 < 2', Item ='(New)', InUse =True WHERE 'flocID = 7 And DocNo = 1';
This is the formula:
		Code:
	
	
	Public Function StringFormatSQL(ByVal s As String, ParamArray params() As Variant) As String 
	 
 
		
 
  
 
		