K
KSmith
The section of code below is causing me problems.
Private Sub AddBadParts()
Dim dbs As DAO.Database
Dim strSQL As String
Dim MyDate
Dim MyTime
Set dbs = CurrentDb
'strSQL = "INSERT INTO tblTally ([CatalogNumber]) VALUES (" &
Me.[txtCatNum] & ");"
strSQL = "INSERT INTO tblTally ([CatalogNumber]) VALUES (""Hello
101st Try"");"
dbs.Execute strSQL
End Sub
ID - is the first field in the table (auto number)
CatalogNumber - is the second field in the table (text)
txtCatNum is a TextBox on the form that displays the data.
The strSQL line above that I have " ' " commented out is the line that gives
me the Error 2465 Can't find the field "|" in my expression.
The strSQL line below that one works. It puts the " Hello" statement in the
CatalogNumber Field.
Thanks in advance for all of your help.
Private Sub AddBadParts()
Dim dbs As DAO.Database
Dim strSQL As String
Dim MyDate
Dim MyTime
Set dbs = CurrentDb
'strSQL = "INSERT INTO tblTally ([CatalogNumber]) VALUES (" &
Me.[txtCatNum] & ");"
strSQL = "INSERT INTO tblTally ([CatalogNumber]) VALUES (""Hello
101st Try"");"
dbs.Execute strSQL
End Sub
ID - is the first field in the table (auto number)
CatalogNumber - is the second field in the table (text)
txtCatNum is a TextBox on the form that displays the data.
The strSQL line above that I have " ' " commented out is the line that gives
me the Error 2465 Can't find the field "|" in my expression.
The strSQL line below that one works. It puts the " Hello" statement in the
CatalogNumber Field.
Thanks in advance for all of your help.