Displaying Photo

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

Guest

I have a form that is able to display a photo for each record. To display the
photo, I need a field to enter the full path/filename of the jpeg file.
Instead of having to type the full path, I created an unbound field with an
expression that concatenates the path and the field that contains just the
filename.

For example, to display the photo, I just need to enter the filename. The
unbound field will then concatenate: "c:/pic/" & txtfilename. However, if I
decided to move the photos to a another directory, I will need to edit the
expression.

I wan to create a button that will allow someone to enter the new path,
which will then be used to concatenate with the filename rather than having
to go into the unbound field and mess with the expression itself. How can I
do something like this? Thanks.
ck
 
hi,
use an update query. attached the update query to the
button.
UPDATE YourTable SET YourTable.filepath = "newpath" ,
Where YourTable.RecordID = [forms]![yourform]![RecordID];
 
Thanks but I can't seem to get the code to work. The table is tblProduct and
the field containing the path is txtPath. I want to be able to automatically
update the txtPath for ALL records once a new path is entered and the button
clicked. How do I do that? Thanks.
ck

hi,
use an update query. attached the update query to the
button.
UPDATE YourTable SET YourTable.filepath = "newpath" ,
Where YourTable.RecordID = [forms]![yourform]![RecordID];
-----Original Message-----
I have a form that is able to display a photo for each record. To display the
photo, I need a field to enter the full path/filename of the jpeg file.
Instead of having to type the full path, I created an unbound field with an
expression that concatenates the path and the field that contains just the
filename.

For example, to display the photo, I just need to enter the filename. The
unbound field will then concatenate: "c:/pic/" & txtfilename. However, if I
decided to move the photos to a another directory, I will need to edit the
expression.

I wan to create a button that will allow someone to enter the new path,
which will then be used to concatenate with the filename rather than having
to go into the unbound field and mess with the expression itself. How can I
do something like this? Thanks.
ck
.
 
Back
Top