J
Jack M
Is there a way to take a number used in one field, drop the last three digits
and place them in the next field?
and place them in the next field?
<br>BruceM said:You are talking about a calculation, and there is probably no need to store
it.
<BR>Does that make better sense? said:Without knowing anything about the purpose of the number or whether it is a
text or a number field I can suggest only a general approach. In the After
Update event for the text box bound to the original number field you could
place the following code:
Me.txtShortenedNumber = Left((Me.NumberField), Nz(Len(Me.NumberField) - 3))
<br>You may just have to write more slowly for me. ;-) said:The same code would probably be placed in the form's Current event, with
some additional lines to account for a NumberField with no value:
If Len(Me.NumberField) <= 3 Then
Me.txtShortenedNumber = ""
Else
Me.txtShortenedNumber = Left((Me.NumberField),
Nz(Len(Me.NumberField) - 3))
End If
The first line of code could also be If Me.NewRecord Then
A few questions you may need to answer if you need more than the above:
Does your number have leading zeros? Will it always be over three digits
(or characters) long? Is there a default value? Does it enter into
calculations?
Jack M said:See my response to what you wrote below, intertwined with your response.
<br>
<b>No, this is not a calculation, but a truncation, dropping the last
three
digits of a birth-order composite number in a family database. This is a
special identification of record owners in the family db that has a
different
purpose than the UID. Each record owner has a special birth-order rank
expressed in a three digit number beginning with 001 within his/her family
of
origin. There is also a birth-order composite that combines the birth-rank
of
each previous generation.
Truncating the composite by dropping the last three digits will allow me
to
directly identify the record owner's parent in the blood line. That new
number identifying the parent needs to be stored in a new field in a
query.
Then comes the grandparent, with the same truncation need.
Does that make better sense?</b>
<br>
<BR>
<b>Whoa!
I'm pretty uninformed as to these codes you mention. I'm sure they are
helpful, but I'm not really a word thinker -- a picture thinker, in fact.
When words and codes are needed, I need more background to make the
picture
so I can understand the words. (You might find it interesting how much
trouble I had going from an industrial world into a psychology degree
where
the words often had a totally different meaning. Imagine then, when I went
into theology where the meanings were kind of the same, but applied to a
totally different concept.) Then, again, my point in this paragraph may be
a
total bore to you.
Is there a way to take a number used in one field, drop the last three digits
and place them in the next field?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.