Gene,
Then use a variation of Cor's example:
selectstring = "select * from name"
If mytexbox.text <> "" then
selectstring &= " where lastname""' _
trim(mytextbox.text) & """
end if
As Cor stated his original and my modified version are both very easy.
Hope this helps
Jay
"Gene Ariani" <ka*****@comcast.net> wrote in message
news:O9**************@tk2msftngp13.phx.gbl...
Well I was trying to avoid writing multiple select statement and fit
everthing into one clean sql statement
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!