M
Miranda
hi,
could someone please help me out with the following statement
Dim db As DAO.Database
Dim strSql As String
Set db = CurrentDb()
strSql = "INSERT INTO labourLog (sheetNumber, labourType, jobDesc, hours,
date, empID, empName)" & _
" VALUES (" & Me.sheet & ", '" & Me.labourType & "' , '" & Me.Text80 & "' ,
" & Me.hours & " , " & Me.currentDate & " , '" & Me.emp.Value & "', '" &
Me.emp.Column(0) & "' );"
db.Execute strSql, dbFailOnError
Set db = Nothing
me.sheet is a number
me.labourType is a string
me.text80 is a string
me.hours is a number
me.currentDate is date
me.emp.value is a string
me.emp.column(0) is a string
if i do ?strsql this is the output i get
INSERT INTO labourLog (sheetNumber, labourType, jobDesc, hours, date, empID,
empName) VALUES (123, 'minerOT' , 'Mega Bolts',3 , 30/01/2004 , 'matt1',
'Bourke, Miranda' );
but i get an error on
db.Execute strSql, dbFailOnError
any ideas?!?!
thanks a lot
could someone please help me out with the following statement
Dim db As DAO.Database
Dim strSql As String
Set db = CurrentDb()
strSql = "INSERT INTO labourLog (sheetNumber, labourType, jobDesc, hours,
date, empID, empName)" & _
" VALUES (" & Me.sheet & ", '" & Me.labourType & "' , '" & Me.Text80 & "' ,
" & Me.hours & " , " & Me.currentDate & " , '" & Me.emp.Value & "', '" &
Me.emp.Column(0) & "' );"
db.Execute strSql, dbFailOnError
Set db = Nothing
me.sheet is a number
me.labourType is a string
me.text80 is a string
me.hours is a number
me.currentDate is date
me.emp.value is a string
me.emp.column(0) is a string
if i do ?strsql this is the output i get
INSERT INTO labourLog (sheetNumber, labourType, jobDesc, hours, date, empID,
empName) VALUES (123, 'minerOT' , 'Mega Bolts',3 , 30/01/2004 , 'matt1',
'Bourke, Miranda' );
but i get an error on
db.Execute strSql, dbFailOnError
any ideas?!?!
thanks a lot