J
Jeri
I've been struggling with this issue for a while, and have searched other
questions for a couple of hours now but haven't found an answer yet. It
should be fairly simple, but the solution eludes me. I hope someone can help.
I am using Access 2007 for scientific data entry.
I have a table of plant species that will eventually grow quite large. On a
form I have fields for the species code, the scientific name, common name,
and alias names. I have a button (btn_SpeciesSearch) that opens the find
dialog box without the "replace" tab. I would like to have the default set to
search all fields, any part of the field. I also want the match case to be
turned off.
I'm using this code
:
me.allowedits=false
docmd.gotocontrol "FloraSpeciesCode"
docmd.runcommand (accmdfind)
me.allowedits=true
I tried using this:
Docmd.findrecord InputBox("enter
text"),acanywhere,false,acsearchall,acall,true
This sort of worked, but I'd like to use the dialog box so they have the
option of searching particular fields. Also, if they are searching for a
genus, it might turn up on a number of records. So the dialog box works
better.
For example, here is one plant species:
FloraSpeciesCode - Pote frut
ScientificName - Potentilla fruticosa
CommonName - bush cinquefoil
Alias - shrubby cinquefoil
If someone is entering a plant name, but can only remember "frut", this
record will come up. Obviously if they entered cinquefoil, this record would
come up twice, but I don't care so much about that. They have the option of
searching under a particular field.
I looked at the customization options, but don't want it to always search
all fields, but only in this particular instance.
I use a lot of combo boxes elsewhere, but it doesn't seem like it will work
for this application.
If anyone has any suggestions, I'd deeply appreciate your help.
Jeri
questions for a couple of hours now but haven't found an answer yet. It
should be fairly simple, but the solution eludes me. I hope someone can help.
I am using Access 2007 for scientific data entry.
I have a table of plant species that will eventually grow quite large. On a
form I have fields for the species code, the scientific name, common name,
and alias names. I have a button (btn_SpeciesSearch) that opens the find
dialog box without the "replace" tab. I would like to have the default set to
search all fields, any part of the field. I also want the match case to be
turned off.
I'm using this code
:
me.allowedits=false
docmd.gotocontrol "FloraSpeciesCode"
docmd.runcommand (accmdfind)
me.allowedits=true
I tried using this:
Docmd.findrecord InputBox("enter
text"),acanywhere,false,acsearchall,acall,true
This sort of worked, but I'd like to use the dialog box so they have the
option of searching particular fields. Also, if they are searching for a
genus, it might turn up on a number of records. So the dialog box works
better.
For example, here is one plant species:
FloraSpeciesCode - Pote frut
ScientificName - Potentilla fruticosa
CommonName - bush cinquefoil
Alias - shrubby cinquefoil
If someone is entering a plant name, but can only remember "frut", this
record will come up. Obviously if they entered cinquefoil, this record would
come up twice, but I don't care so much about that. They have the option of
searching under a particular field.
I looked at the customization options, but don't want it to always search
all fields, but only in this particular instance.
I use a lot of combo boxes elsewhere, but it doesn't seem like it will work
for this application.
If anyone has any suggestions, I'd deeply appreciate your help.
Jeri