Click to See Complete Forum and Search --> : inserting a variable value into access


met12
June 7th, 2004, 04:38 PM
I need help inserting the variable value into an access DB using VB 5.0. I've tried the code below with no success. The variable is "Salescredit.Text", I can't insert the value for this. I keep getting the variable name itself inserted and not the value. Any help would be much appreciated.

Thanks,
met12



dbs.Execute "Insert into accrec" & "(Acc, Salescredit) VALUES " & "('1111','&Salescredit.Text&');"

met12
June 7th, 2004, 05:21 PM
Got it to work by doing this ,'" & Salescredit.Text & "',

Thanks,
met12