A
ajbarilla
I have a form with a button that I am trying to use to fill information
about documents. The information about the documents is listed in
"tblDocumentList." The names of the documents are displayed in a
text box that pulls directly from "tblDocumentList." I am including
my code below. When I run the code, I get a syntax error.
searchcrit = Me.DocumentList
Set rstedit = db.OpenRecordset("SELECT * FROM tblDocumentList WHERE
tbldocumentlist.[Document] = " & searchcrit)
I believe the problem is originating from the fact that the search
criteria is text. If i use the code below and search by the ID
number of the documents it works, but not with the document name.
searchcrit = Me.DocumentList
Set rstedit = db.OpenRecordset("SELECT * FROM tblDocumentList WHERE
tbldocumentlist.[ID] = " & searchcrit)
any help would be appreciated.
about documents. The information about the documents is listed in
"tblDocumentList." The names of the documents are displayed in a
text box that pulls directly from "tblDocumentList." I am including
my code below. When I run the code, I get a syntax error.
searchcrit = Me.DocumentList
Set rstedit = db.OpenRecordset("SELECT * FROM tblDocumentList WHERE
tbldocumentlist.[Document] = " & searchcrit)
I believe the problem is originating from the fact that the search
criteria is text. If i use the code below and search by the ID
number of the documents it works, but not with the document name.
searchcrit = Me.DocumentList
Set rstedit = db.OpenRecordset("SELECT * FROM tblDocumentList WHERE
tbldocumentlist.[ID] = " & searchcrit)
any help would be appreciated.