Author: Stefan HoffmannStefan Hoffmann Date: May 20, 2008 04:13
hi Luis,
Luis wrote:
> What i'm trying to do is to add a record on a table (Table1) with the values
> stored on the array. All the information stored on the array is related only
> to one record on the target table.
You normally don't need an array, try this:
Dim strSQL As String
strSQL = "INSERT INTO [yourTable] (fieldList) " & _
"VALUES (" & _
Me![field1] & ", " & _
Me![field2] & ", " & _
Me![fieldX] & ", " & _
")"
CurrentDb.Execute strSQL, dbFailOnError
When field is a String then you need
"'" & Replace(Me![fieldS], "'", "''") & "', " & _
mfG
--> stefan <--
|