-----Original Message-----
I have a list box in a form that is getting its values
from another linked table (txtpersonnelname). I would
like a second field that automatically puts in another
value from that record (txtpersonnelnameacronym). How do
I do this?
.
It sounds like you want the acronym to "fill in" to this
table from the linked table into this "main" table. In
other words, the "main" table would have an acronym field
in the table also.
DLOOKUP will do this, and could "fill in" the field for
you , but consider: under this design, if subsequently
this person's acronym changes, the previous entries won't
reflect this. New ones will, but previous ones won't.
I believe this violates some sort of "normalization" rule;
I can't remember which one. After all, besides the fact
that the prior records in your "main" wouldn't reflect the
current acronym, you're also storing the acronym in 2
places unnecessarily. Again, that violates some
normalization rule, I forget which one.
On the other hand, if what you're proposing is for this
form to merely "pluck" or display the acronym at run time,
that would be ideal. You could have either (a) a query
(which your form would be based on) which merely displays
(or "plucks") this related field (acronym); in this manner
it would always reflect the current one. Or you could use
DLOOKUP which would pull up ("pluck") the acronym and
merely display it in an unbound text box on your form. You
would trigger this "plucking" event with the form's ON
CURRENT event procedure, and have the AFTER UPDATE event
procedure of the list box trigger this event too.
If you need code samples, let me know.
LRH
http://www.dbases.net/knowledge_base