Adding data to multiple entries in a field

  • Thread starter Thread starter Iwilfix
  • Start date Start date
I

Iwilfix

I have a text field containing consecutive numbers.
I want to add the same prefix to each record in that field .
( i.e. Column contains numbers 1 - 2000. And I want to add
Agp- in front of every existing number in that column.)
Can this be done?
 
Hi,

You can use an update query.

UPDATE tblTable SET [TextField] = 'Agp-' & [TextField];

HTH,
Immanuel Sibero
 
I have a text field containing consecutive numbers.
I want to add the same prefix to each record in that field .
( i.e. Column contains numbers 1 - 2000. And I want to add
Agp- in front of every existing number in that column.)
Can this be done?

If it's a numeric field, no you cannot: numeric fields can only
contain numeric values.

What you *can* do is set the Format property of the field to

"Agp-"#

to *display* the text, without actually storing it in your table.
 
I have a text field containing consecutive numbers.
I want to add the same prefix to each record in that field .
( i.e. Column contains numbers 1 - 2000. And I want to add
Agp- in front of every existing number in that column.)

Sounds like a jolly waste of time and disk space to me. Are you going to
use a different prefix in the future?

If not, use a format to display the stuff.

If so, does the prefix carry some meaning in the record? If so, then it
needs to go in its own field (remember 1NF?); and if not then it probably
doesn't need to go anywhere.

HTH


Tim F
 
Weeeelllll... this is definitely a case where someone asks how to commit
suicide, I give him a gun.

Iwilfix, John's and Tim's comments are valid points. Even though you did say
the field is a text field therefore an update query will work, what you're
trying to do doesnt make a lot of sense.

Immanuel Sibero
 
Immanuel

Thanks for your suggestion. And it worked.
I wanted to update that field without adding a new column
I was experimenting a way to identify certain records.
I was dealing with aprox 10.000 records which I wanted to split
in 10 different groups. These prefixes will now be added with each
new entry. Both Tim and John made suggestions to
keep the number of columns
to a minnimum, and have made drastic improvements.
And even though They have been so helpful to me
in the past, I think they feel I'm wasting alot time and effort
in my projects. What they don't know is how much further
(in my own mind anyway) I have gotten with the info they have
given me, and how easy it is to sort, display and print the info
I need with a few control buttons and query parameters.

As always though, thank you, and them as well

Jeff V
 
Back
Top