updating specific characters in an access record

G

Guest

I am using an Access database to store biographical info on members of our
schools foundation board. From this database, I will also print out
directories, mailings, etc. etc. One of the publications we print is a
profile directory which contains a picture of the member.

I have setup a form in access that displays the profile image, allows the
user to search our server for the image, and saves the path/filename of the
image to the database (not the image itself). I used some code snippets I
found on this site to make this all work, and it works great.

But...it creates another problem with Word. The IncludePicture mergefield
in word requires (i believe) that the format of the PATH be
"drive:\\folder1\\folder2\\image.ext" (basically requires there to be two \'s
instead of one). Because the database code uses the images path to display
the image in access, I can't change that path information. However, what I
thought I would do is create another field in the table and use a query to
add the extra \ (backslashes) to the path. The query would look at the
current ImagePath field, and in the ImagePathWord field, it would simply add
the needed \.

Can this be done? Would I use an update query to do this? Or, is there an
easier way to make this happen so Word will print these images?
 
G

Guest

Roy,

If you are using Word Mail Merge, you should be able to use a query as your
data source, rather than a table. If so, you won't need to create the
additional field in your table, just create a new column in the query,
something like:

WordPath: Replace([PathField], "\", "\\")

Where [PathField] is the name of the field in your database that contains
the path to the image.

HTH
Dale
 
G

Guest

Great, makes sense. Thanks a lot

Dale Fye said:
Roy,

If you are using Word Mail Merge, you should be able to use a query as your
data source, rather than a table. If so, you won't need to create the
additional field in your table, just create a new column in the query,
something like:

WordPath: Replace([PathField], "\", "\\")

Where [PathField] is the name of the field in your database that contains
the path to the image.

HTH
Dale
--
Email address is not valid.
Please reply to newsgroup only.


Roy Carlson said:
I am using an Access database to store biographical info on members of our
schools foundation board. From this database, I will also print out
directories, mailings, etc. etc. One of the publications we print is a
profile directory which contains a picture of the member.

I have setup a form in access that displays the profile image, allows the
user to search our server for the image, and saves the path/filename of the
image to the database (not the image itself). I used some code snippets I
found on this site to make this all work, and it works great.

But...it creates another problem with Word. The IncludePicture mergefield
in word requires (i believe) that the format of the PATH be
"drive:\\folder1\\folder2\\image.ext" (basically requires there to be two \'s
instead of one). Because the database code uses the images path to display
the image in access, I can't change that path information. However, what I
thought I would do is create another field in the table and use a query to
add the extra \ (backslashes) to the path. The query would look at the
current ImagePath field, and in the ImagePathWord field, it would simply add
the needed \.

Can this be done? Would I use an update query to do this? Or, is there an
easier way to make this happen so Word will print these images?
 

Ask a Question

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.

Ask a Question

Top