General Community > Chit Chat
Small Access Project
A.M.A:
try this:
--- Code: ---Dim strSQL As String
strSQL = "SELECT * FROM documents WHERE description LIKE '*" & Me![txtsearch] & "*'"
Me.RecordSource = strSQL
--- End code ---
[Unknown]:
Okay, I've got a stupid question... why do this...
--- Code: ---Dim strSQL As String
strSQL = "SELECT * FROM documents WHERE description LIKE '*" & Me![txtsearch] & "*'"
Me.RecordSource = strSQL
--- End code ---
And not just this...?
--- Code: ---Me.RecordSource = "SELECT * FROM documents WHERE description LIKE '*" & Me![txtsearch] & "*'"
--- End code ---
Seems like less work to me... why bother with creating the string, etc... just wastes proccessor and typing time...
Then again, I've never dealt with access - maybe you have to do that. (which would only tell me that the language is useless and crappy.)
-[Unknown]
A.M.A:
It will work as well .. but that was M$ guidelines and it is a ready example, I just changed SQL.
Joseph:
--- Quote from: A.M.A on August 15, 2003, 10:11:29 PM ---try this:
--- Code: ---Dim strSQL As String
strSQL = "SELECT * FROM documents WHERE description LIKE '*" & Me![txtsearch] & "*'"
Me.RecordSource = strSQL
--- End code ---
--- End quote ---
Much obliged.
A.M.A:
Glad to be of help :)
Navigation
[0] Message Index
[*] Previous page
Go to full version