Just to tag along on Ken's correct response.
Remember that simply having a file name (123.jpg) doesn't actually mean
that Access will be able to find it, as Access will append the currnet
directory to that file name, and you don't always know where the current
directory is pointing.
You're better off putting a complete file path. If your intent is that the
jpg files will be in the same folder as the MDB, you should be able to use
=CurrentProject.Path & "\" & [ID] & ".jpg" (assuming Access 2000 or
newer). For previous versions of Access, you can use Left(CurrentDb.Name,
Len(CurrentDb.Name) - Len(Dir(CurrentDb.Name))) & [ID] & ".jpg"
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Ken Snell said:
You cannot do this directly in the table's properties. You can do it on a
form by setting the Default Value property of a textbox that will display
the value:
=[ID] & ".jpg"
Note that the default value will be displayed in this case *only when*
you're creating a new record.
--
Ken Snell
<MS ACCESS MVP>
I want to make the default value of a field to equal the value in the ID
field and append .jpg to it so that it will automatically populate the
field with a value such as 123.jpg where 123 equals the ID field. Is
this possible through the properties section or will I need to program
it?
Thanks for any help.
Ed