denise18 said:
Hello,
I have a form in which I would like users to be able to
attach files that go with the various cases they enter in.
(Like screen shots)Is this possible?
What I do is provide a ComboBox that shows existing attachments and has " -
Add New - " as the first choice. In the AfterUpdate event I test to see if
the user chose " - Add New - ". If so, I display the File-Browse dialog so
the user can browse to the desired file. Upon selecting the file I copy it
to a different folder and rename it as "PrimaryKeyValue_n.ext" where
PrimaryKeyValue is the ID Number of the current record, 'n' is the ordinal
number of the file (1 for the first file added, 2 for the second, etc.), and
"ext" is carried over from the original file name. I then prompt the user
for a brief description using an InputBox. The name of the file and the
description are then inserted into a FileAttachments table and the
descriptions are what they see in the ComboBox.