G
Gary Schuldt
Here's the situation:
I have a garden plant database. I'm trying to improve the searching
functionality on it.
I have a form based on a query that displays botanical name (txtBotName) and
common name.
The Botanical Name is the concatenation of Genus, Species, and Variety
names. The query does this concatenation and is sorted ascending on
Botanical Name.
I want to find and display a record that contains a specified search
word/phrase (e.g., coral) in any of those fields (essentially Botanical Name
and Common Name).
So far, so good: I can clunk through this with Edit->Find and locate the
record I want, and do FindNext to look at another one.
However, in many cases the user will want to directly browse the Botanical
Names surrounding the one found by FindRecord. To do this, I added to the
form an unbound combo box cbxBrowseBotName whose control source is the same
as that of the form, and the only column in it is the Botanical Name.
To browse, I do all this with the mouse after Finding a record: I highlight
the txtBotName value, Ctrl-C, highlight cbxBrowseBotName value, Ctrl-V and
then hit the drop-down arrow and . . . Voila! I see the nearby Botanical
Names in the drop-down. I have an AfterUpdate event on the cbx to find the
any newly selected record, and that works fine.
It seems, though, that I should be able to produce the cbx dropdown either
using a macro or VBA code without all that highlighting and cutting and
pasting, but I can't figure out how to do it.
I need some help with that. Or, if you see a better way to achieve the same
functionality, I'd sure be open to that as well!
TIA
Gary
I have a garden plant database. I'm trying to improve the searching
functionality on it.
I have a form based on a query that displays botanical name (txtBotName) and
common name.
The Botanical Name is the concatenation of Genus, Species, and Variety
names. The query does this concatenation and is sorted ascending on
Botanical Name.
I want to find and display a record that contains a specified search
word/phrase (e.g., coral) in any of those fields (essentially Botanical Name
and Common Name).
So far, so good: I can clunk through this with Edit->Find and locate the
record I want, and do FindNext to look at another one.
However, in many cases the user will want to directly browse the Botanical
Names surrounding the one found by FindRecord. To do this, I added to the
form an unbound combo box cbxBrowseBotName whose control source is the same
as that of the form, and the only column in it is the Botanical Name.
To browse, I do all this with the mouse after Finding a record: I highlight
the txtBotName value, Ctrl-C, highlight cbxBrowseBotName value, Ctrl-V and
then hit the drop-down arrow and . . . Voila! I see the nearby Botanical
Names in the drop-down. I have an AfterUpdate event on the cbx to find the
any newly selected record, and that works fine.
It seems, though, that I should be able to produce the cbx dropdown either
using a macro or VBA code without all that highlighting and cutting and
pasting, but I can't figure out how to do it.
I need some help with that. Or, if you see a better way to achieve the same
functionality, I'd sure be open to that as well!
TIA
Gary