hi,
I am trying to insert a few values into my companies database using an insert into statement. Everything goes well untill I try to insert a value into a field name called # Refills, no matter what syntax I use it will not allow me to insert the value into the field .... Is it something to do with the "#" character????
anyway here is the code....Please help!!!
Dim cnn As ADODB.Connection
Set cnn = CurrentProject.Connection
Dim strSqlmedInsert As String
If Action.VALUE = "A" Then
strSqlmedInsert = "INSERT INTO medications ( medication, quantity, frequency, #_refills)"
strSqlmedInsert = strSqlmedInsert & "Select '" & strMedName & "' , '" & strQuantity & "' , '" & strPatInstructions & "' , '" & strRefills & "' "
cnn.Execute strSqlmedInsert, , adExecuteNoRecords
I am trying to insert a few values into my companies database using an insert into statement. Everything goes well untill I try to insert a value into a field name called # Refills, no matter what syntax I use it will not allow me to insert the value into the field .... Is it something to do with the "#" character????
anyway here is the code....Please help!!!
Dim cnn As ADODB.Connection
Set cnn = CurrentProject.Connection
Dim strSqlmedInsert As String
If Action.VALUE = "A" Then
strSqlmedInsert = "INSERT INTO medications ( medication, quantity, frequency, #_refills)"
strSqlmedInsert = strSqlmedInsert & "Select '" & strMedName & "' , '" & strQuantity & "' , '" & strPatInstructions & "' , '" & strRefills & "' "
cnn.Execute strSqlmedInsert, , adExecuteNoRecords