Using the Right$() function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

I am getting syntax errors on this line of code (using the Right$()), can
someone lead me to what is wrong?


vSql1 = "Select sku, sku_desc, wgt1, hgt1, wid1, dpth1 from viaware_pm_f
where sku_type = ""NORM"" and sku = ""Right$(""00000000"", & rs!PartNum, 8) &
"""""

It was shown to write it this way, but it will not compile.

vSql1 = "Select sku, sku_desc, wgt1, hgt1, wid1, dpth1 from viaware_pm_f
where sku_type = ""NORM"" and sku = “â€â€Right$(“00000000â€, & rs!PartNum, 8) &
“â€â€
 
Try:

vSql1 = "SELECT sku, sku_desc, wgt1, hgt1, wid1, dpth1 FROM viaware_pm_f "
& _
" WHERE sku_type = ""NORM"" AND sku = """ & _
Right$("00000000" & rs!PartNum, 8) & """"
 
Thanks! That did it..

Van T. Dinh said:
Try:

vSql1 = "SELECT sku, sku_desc, wgt1, hgt1, wid1, dpth1 FROM viaware_pm_f "
& _
" WHERE sku_type = ""NORM"" AND sku = """ & _
Right$("00000000" & rs!PartNum, 8) & """"
 
Back
Top