What then is the best solution? I have a query that among
other fields pulls 2 text fields that are mnemonics for a single item.
Call them mnemonic1 and mnemonic2. It is a select query for a report
that has a macro attached to initiate a popup form with the combo box.
The current row source for the combo box is mnemonic1 from table PDM
and [Forms]![frm_Select Drug by mnemonic][combobox] is the criteria
for mnemonic1 in the query.This all works well but I can't search
mnemonic2 this way. A drug like Lanoxin 0.125mg tab may have a
mnemonic1= L125T or mnemonic2=LANO1T, both of which would callup the
drug.
I have been trying to be able to search as a query parameter
both mnemonic1 and mnemonic2 easily with one entry. I am unable to do
an append query because the table is generated from a server that will
not allow it and for some reason I have been unsuccessful at making a
union query.
Select PDM.mnemonic1 from PDM
Union All Select PDM.mnemonic2 from PDM
Even if it did work I am unsure about how to bring together
the union query, select query and combo box.
Is there no way to create an appended field (mnemonic1
appended with mnemonic2) within the query via some language to make
that work?
Thank you and sorry if my terminology is incorrect as I am
very new to this.
Carl
OnLet me qualify that by saying for Primary or Unique key values.
If you use a bound combo to search for a record using a primary key,
you
change the value of the primary key for the current record. I doubt
seriously any wants to do that on purpose.
While ComboBoxes *can* be used for searching that is not what they are used
for the vast majority of the time.
Depends on who is doing the development. I use combo's sparingly.
Hard
coded value lists often require modification and redeployment.
table or query row sources can degrade performance.
It is all a matter of style.
--
Dave Hargis, Microsoft Access MVP
Rick Brandt said:
Huh? What if changing the bound value in the table is the desired result?
While ComboBoxes *can* be used for searching that is not what they are used
for the vast majority of the time.