Using the Right$() function

M

Mark

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) &
“â€â€
 
V

Van T. Dinh

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) & """"
 
M

Mark

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) & """"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top