Can someone provide info on how to insert more than one value into a row using VBA?
say
date
time
name
surname
using
CurrentDb.Execute "INSERT INTO table ([field]) " _ & "VALUES (" & control & ")"
Can someone provide info on how to insert more than one value into a row using VBA?
say
date
time
name
surname
using
CurrentDb.Execute "INSERT INTO table ([field]) " _ & "VALUES (" & control & ")"
Here is an Example:
Dim strSQL As String
strSQL = "INSERT INTO tblReportLog (lrptdte,lsentto,lsubject,lmessage,lbcc, lrptname,loutputtype ) "
strSQL = strSQL & "VALUES (#" & Me.rdtesent & "#,'" & Me.EmailTo & "','" & Me.EmailSubject & "','" & Me.EmailMessage & "','" & Me.cbobcc & "','" & Me.txtrptname & Me.txtextension & "','""')"
CurrentDb.Execute strSQL, dbFailOnError