How to save an auto text field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 input fields in the form, last name and first name, which I need
them separate for later queries. I have another field which equals first
name + last name and will be used for lookup in another form. I manage to
get the field right but it cannot be saved. Is there a way to get round this
? Thanks a lot.
 
If your table already holds first and last names, it is rarely necessary or
advisable to save a "calculated" field that combines these. That's what
queries are good for...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
You don't save it. If you will do a search, you'll find tons of posts on
"storing calculated values". All of them point out that you don't do it.
It is redundant. What if someone gets married or divorced? Do you want to
fix two fields?

Just use that same formula in your lookup field in your other form.
 
Rick said:
You don't save it. If you will do a search, you'll find tons of posts on
"storing calculated values". All of them point out that you don't do it.
It is redundant. What if someone gets married or divorced? Do you want to
fix two fields?

Just use that same formula in your lookup field in your other form.

Or alternately, you work with a primary key so that you don't have
problems when two people have the same name. e.g. John Smith.

Your best bet it to make sure that there is a primary numeric key
associated with each record (an autonumber would work fine).
-D
 
Rick said:
You don't save it. If you will do a search, you'll find tons of posts on
"storing calculated values". All of them point out that you don't do it.
It is redundant. What if someone gets married or divorced? Do you want to
fix two fields?

Just use that same formula in your lookup field in your other form.

Or alternately, you work with a primary key so that you don't have
problems when two people have the same name. e.g. John Smith.

Your best bet it to make sure that there is a primary numeric key
associated with each record (an autonumber would work fine).
-D
 
Thanks a lot for your reply. I understand the reason why calculated fields
should not be saved. However, when I used the lookup function in another
form, it can show me 2 fields/columns, but when I select an item, it will
only return 1 field and not 2 as I expected. How can I solve this ? Thanks.
 
Albert

We're not there, we can't see what you're working on. "... when I used the
lookup function..." could mean any number of things.

Are you talking about using a combo box (drop-down) in a form? If so,
there's no reason you couldn't create a query that combines the two fields
as you wish, and base your combo box on the query instead of the table.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top