Welstead
08-10-2009, 06:04 AM
Hi Guys,
I have a an Ole Object type field in a table. To limit size I would like to have users only upload ZIP files.
Is this possible?
Thanks!
Alisa
08-10-2009, 05:43 PM
Just check the last three characters of the file name before you insert it into your database . . . should be simple enough.
Welstead
08-11-2009, 12:09 AM
Just check the last three characters of the file name before you insert it into your database . . . should be simple enough.
How do i do this?
I have the field on a form with instructions to right click and insert object. Is there a better way of showing this on a form and thus adding validation rules?
Alisa
08-11-2009, 05:41 AM
Yes I would do this through a form. Here is some excellent code for how to have the user browse to a file: http://www.mvps.org/access/api/api0001.htm
Look carefully at the code and you will be able to figure out how to only show them zip files. Then, after they have selected a file, get the file name, and check right(filename,3) to see if it equals "zip". If it doesn't, you can warn them to try again and pick a zip file.