By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,347 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

Like in Open Form Command

P: n/a
Anyone know how to make the LIKE command work in the following OpenForm
command?

DoCmd.OpenForm "frmSearchResults", , , "[bbid#] = '" & bbid & "'"

This will work if I type the whole bid #, but if I type part of it it
will not return any results, even though I know it should.

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
DoCmd.OpenForm "frmSearchResults", , , "[bbid#] Like '*" & bbid & "*'"
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Nothing" <me@you.com> wrote in message news:42**********@127.0.0.1...
Anyone know how to make the LIKE command work in the following OpenForm
command?

DoCmd.OpenForm "frmSearchResults", , , "[bbid#] = '" & bbid & "'"

This will work if I type the whole bid #, but if I type part of it it
will not return any results, even though I know it should.

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #2

P: n/a
Nothing <me@you.com> wrote in news:42**********@127.0.0.1:
Anyone know how to make the LIKE command work in the following
OpenForm command?

DoCmd.OpenForm "frmSearchResults", , , "[bbid#] = '" & bbid &
"'"

This will work if I type the whole bid #, but if I type part
of it it will not return any results, even though I know it
should.

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


To type in the first part,
DoCmd.OpenForm "frmSearchResults", , , "[bbid#] like '" & bbid &
"'*"

To type in the last part,
DoCmd.OpenForm "frmSearchResults", , , "[bbid#] like *'" & bbid &
"'"

To type in the middle part,
DoCmd.OpenForm "frmSearchResults", , , "[bbid#] like *'" & bbid &
"'*"

Or if you want to put the wildcards manually
DoCmd.OpenForm "frmSearchResults", , , "[bbid#] like '" & bbid &
"'"

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.