B
Brian
Thanks for the reply. I added the format function on my
dates and the debug.print result looks good. All single
quotes and the # symbols around dates and the ; at the
end. Is there a restriction as to where you can call the
rst.Open command? I have it in my Private Sub Form_Load()
procedure. It is still giving me the same error as
before.
Brian
append, etc.).
dates, and single-quotes for text values that are needed
as criteria.
Purchased] > #" & Format(Brian_Value2, "MM/DD/YYYY")
& "#;")
dates and the debug.print result looks good. All single
quotes and the # symbols around dates and the ; at the
end. Is there a restriction as to where you can call the
rst.Open command? I have it in my Private Sub Form_Load()
procedure. It is still giving me the same error as
before.
Brian
looking for data, not manipulating data (like delete,-----Original Message-----
Make sure your SQL (within that variable) is just
append, etc.).
strsearch variable. That means using the proper #'s forOne possible error would be the punctuation of your
dates, and single-quotes for text values that are needed
as criteria.
[Product Name] = '" & Brian_Value1 & "' and [DateExample:
Brian_Value1 = "ABCDEFG"
Brian_Value2 = Datevalue("06/01/04")
strsearch = "Select * from [Some Table Name] Where
Purchased] > #" & Format(Brian_Value2, "MM/DD/YYYY")
& "#;")
statement, allowing for variables' Note the single & double quotes within the SQL
..Tim
.