Microsoft
Software
Hardware
Network
Question : VBA SQL sysntax
This is my query:
sql = "SELECT STOCK.stCode, STOCK.stDescLine1, STOCK.stBarCode, Trim([stCode]) AS BC FROM Exchequer.BGCI02.STOCK STOCK "
sql = sql & "WHERE STOCK.BC = '" & ActiveCell & "'"
The StBarcode fiels has trailing spaces so I need to trim it but Excel returns "Trim is not a built in funtion"
Does anyone know how to acheive this?
Answer : VBA SQL sysntax
try
sql = "SELECT STOCK.stCode, STOCK.stDescLine1, STOCK.stBarCode, RTrim(LTrim([stCode])) AS BC FROM Exchequer.BGCI02.STOCK STOCK "
sql = sql & "WHERE STOCK.BC = '" & ActiveCell & "'"
Random Solutions
VB6 to VS2010 - Training Advice ?
Windows XP and Microsoft Outlook and Windows Installer problems
This search script is presenting the option for Next 10 when there aren't any results. What do I need to add to not show when there aren't results?
OCE 9400 plotter doesn't start
Export Access 2010 Report to CSV with Headers?
Active Directory DNS records issue
Outlook 2007 can not open network saved Archive file
Need Manual (PDF) for Canon ImageRunner C4080
Error string in catch block?
How do I add buttons on a PDF form to add/remove rows of data?