D
Dave C
I have a table that is behaving strangely.
I use an attachment field to store a photograph of the person in the record.
On the input form, I have this field disabled and locked, and use a button
to programatically add the photo to the record. This works fine.
The weird behavior comes into play when I use a SQL statement to clear the
table. (I do this to clear my test data before distributing the database.)
The command is:
docmd.runsql "DELETE FROM tblGuests"
When I look, the table appears to be empty. However, when I call the form
to add a new record, as soon as I type something in the first field, the
picture that had been in the first record suddenly appears.
The same thing happens if I type a new record directly into the table. As
soon as the record goes dirty, I'll see the attachment field has changed from
0 to 1.
Is it necessary to go through the records one at a time and delete all
attachments before deleting the records, or is there an easier way to do it?
I use an attachment field to store a photograph of the person in the record.
On the input form, I have this field disabled and locked, and use a button
to programatically add the photo to the record. This works fine.
The weird behavior comes into play when I use a SQL statement to clear the
table. (I do this to clear my test data before distributing the database.)
The command is:
docmd.runsql "DELETE FROM tblGuests"
When I look, the table appears to be empty. However, when I call the form
to add a new record, as soon as I type something in the first field, the
picture that had been in the first record suddenly appears.
The same thing happens if I type a new record directly into the table. As
soon as the record goes dirty, I'll see the attachment field has changed from
0 to 1.
Is it necessary to go through the records one at a time and delete all
attachments before deleting the records, or is there an easier way to do it?