From: Ken G on
I have a database that has a text field that contains a default file path to
a picture folder. I've moved the folder and changed the default value of the
text field to point to the new location, but the change only affects new
records. How can I apply the change to the existing records?
From: Ken G on

Sorry - using Access 2003 with XP Pro SP3

"Ken G" wrote:

> I have a database that has a text field that contains a default file path to
> a picture folder. I've moved the folder and changed the default value of the
> text field to point to the new location, but the change only affects new
> records. How can I apply the change to the existing records?
From: Marco Pagliero on
On 8 Apr., 15:51, Ken G <K...(a)discussions.microsoft.com> wrote:
> I have a database that has a text field that contains a default file path to
> a picture folder. I've moved the folder and changed the default value of the
> text field to point to the new location, but the change only affects new
> records. How can I apply the change to the existing records?
It seems you store the default path into every picture record? This
would be a mistake. Every record should only have the file name. The
folder path has to exist only once in the database and has to be known
only by the code which retrieves the pictures.
Anyway:
update PicsTable set PicsPath = "NewPicsPath"

If the path and the file name were in the same column this would be
the second mistake. Then you have first to separate the file name from
the path, of course.

Greetings
Marco P


From: Daryl S on
Ken -

You will need to use an update query to change existing records. Remember
to back up your data before you make any changes. The code would be
something like this (you your names and values):

UPDATE YourTable
SET pathfield = "new path"
WHERE pathfield = "old path";

--
Daryl S


"Ken G" wrote:

>
> Sorry - using Access 2003 with XP Pro SP3
>
> "Ken G" wrote:
>
> > I have a database that has a text field that contains a default file path to
> > a picture folder. I've moved the folder and changed the default value of the
> > text field to point to the new location, but the change only affects new
> > records. How can I apply the change to the existing records?
From: Ken G on
Yes, you are correct. I have the file path in a text field in every record. I
now see how clumsy this is so I'll have a go at modifying the retrieval code
to include it in there instead. This was my first serious attempt at
creating an access data base, so I'm still at the bottom of the learning
curve.

"Marco Pagliero" wrote:

> On 8 Apr., 15:51, Ken G <K...(a)discussions.microsoft.com> wrote:
> > I have a database that has a text field that contains a default file path to
> > a picture folder. I've moved the folder and changed the default value of the
> > text field to point to the new location, but the change only affects new
> > records. How can I apply the change to the existing records?
> It seems you store the default path into every picture record? This
> would be a mistake. Every record should only have the file name. The
> folder path has to exist only once in the database and has to be known
> only by the code which retrieves the pictures.
> Anyway:
> update PicsTable set PicsPath = "NewPicsPath"
>
> If the path and the file name were in the same column this would be
> the second mistake. Then you have first to separate the file name from
> the path, of course.
>
> Greetings
> Marco P
>
>
> .
>