Microsoft Access - How to recognize an Empty Attachment Field in VBA?

Asked By James Hill on 12-May-12 01:03 AM
Good evening--I am using Access 2007 FE / Sharepoint 2010 BE.  Have a "close" button on a form, and trying to write VBA code in that button's "on click" event to recognize if the attachment field on the form is empty or not.  If tried the "empty" lingo, as well as "If IsNull"--neither seem to work.

Any suggestions?  Thank you

James
James Hill replied to James Hill on 14-May-12 05:30 PM
Found the solution--just create a text box, set its control source to the attachment field, and it will automatically count the number of records in the attachment field.  If the attachment field =0, I put code on the close button's on click event to prevent closure.  Thanks
James