G
Guest
I've been using this nice little code to add items to combo boxes that worked
great until I made a change to the way the table was named. I'd also like to
add that our office just upgraded from Office 97 to Office XP (in case this
makes a difference).
the code that worked great until now:
......
strSql = "insert Into tblName ([feildName]) values " & "('" & NewData & "')"
stLinkCriteria = "[feildName] = '" & Me.comboName.Text & "'"
if x = vbYes then
CurrentDb.Execute strSql, dbFailOnError
DoCmd.OpenForm "formName", , , stLinkCriteria
Response = acDataErrAdded
Else: Response = acDataErrContinue
end if
what I've done different:
I've changed the table name by request from - tblRelDetails
to - tbl Occurrence Details
I've changed the code to reflect this and enclosed the table name in []
I keep getting an error for the strSql Line and can't figure out why this is
happening.
Does anyone have any suggestions? Would be much appreciated.
great until I made a change to the way the table was named. I'd also like to
add that our office just upgraded from Office 97 to Office XP (in case this
makes a difference).
the code that worked great until now:
......
strSql = "insert Into tblName ([feildName]) values " & "('" & NewData & "')"
stLinkCriteria = "[feildName] = '" & Me.comboName.Text & "'"
if x = vbYes then
CurrentDb.Execute strSql, dbFailOnError
DoCmd.OpenForm "formName", , , stLinkCriteria
Response = acDataErrAdded
Else: Response = acDataErrContinue
end if
what I've done different:
I've changed the table name by request from - tblRelDetails
to - tbl Occurrence Details
I've changed the code to reflect this and enclosed the table name in []
I keep getting an error for the strSql Line and can't figure out why this is
happening.
Does anyone have any suggestions? Would be much appreciated.