Limit Ole Object Type (1 Viewer)

Welstead

New member
Local time
Today, 06:03
Joined
Mar 31, 2008
Messages
6
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

Registered User.
Local time
Yesterday, 23:03
Joined
Jun 8, 2007
Messages
1,931
Just check the last three characters of the file name before you insert it into your database . . . should be simple enough.
 

Welstead

New member
Local time
Today, 06:03
Joined
Mar 31, 2008
Messages
6
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

Registered User.
Local time
Yesterday, 23:03
Joined
Jun 8, 2007
Messages
1,931
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.
 

Users who are viewing this thread

Top Bottom