Topics Search

Add 'attachment' field with vba

Add 'attachment' field with vba
Views: 190
I'm creating a tool to create tables from given data (name, field-type, format, etc.). Everything is working smooth so far, but I have absolutely no clue how to create a field with the datatype 'attachment' with VBA. I've searched for a while now, but couldn't find anything helpful
Sponsored Links:

More topics

 

Add multiple records with one field

Preview
Please find attached my form, the "Slide" field is of type attachment. This field usually has min 5 attachments, is there a way that a record can be made for each attachment added, the Start and End Date will be the same for every attachment.

Can someone please help, it takes a long time to add each attachment seperately.
 

Attachment data type and VBA

Preview
I'm trying to create one record from another one. One field is attachment data type. I just create a normal query (INSERT INTO) but it' not working (impossible with multiple value field). Do you have a suggestion about inserting or updating an attachment datatype field (with or without VBA
 

Add an attachment to form

Preview
I am trying to add an attachment to a subform. I update the control source to say "Attachment" in the properties section which matches the name of the field in the table where it's pulling from.

When I open in form view and right-click on the text box (for attachment) the manage attachments selection is greyed out. If I go to the table I can open the attachment.

Any idea why this isnt working in the form
 

Manage attachments

Preview
I have a form in which the fields are enabled or disabled based on user permissions. If a user has only 'Read' permission then all the fields are disabled else the fields are enabled. Now I also have an attachment field in my form. If I disable the attachment field, then the user is unable to view the attachments. I want the users with 'Read' permission to view the attachments but not manipulate it. Like, a user with 'Read' permission must not be able to 'Add' or 'Remove' an attachment, but he must be able to 'Open' the attachment and 'Save' the attachment.

P.S: I have used the default 'attachment' which comes with MS-Access, that is I have added a field with the datatype 'attachment' and made my textbox a bound field in the form
 

Send email with attachment from access

Preview
But I want to use vba to add the persons name to the beginning of the email? can not find a way, Was able to Make adoc in word that would add the customer name but can not add the report as an attachment
 

attachment in field from VBA

Preview
I like to fill a recordfield with type attachment from vba.
should be something like

With table
.Addnew
!field1 = something
!field2 = somethingelse
!field3 = [here I want to point to a file on disk
 

Attached Files

Preview
I created a database with an attachment field that is working fine. But for future use, we will be using a SQL database so the attachment field, which is not supported in Microsoft SQL 2005 will become useless for our ASP.Net application. I would like to keep using the attachment filed in access, but I would like to add the actual file name to the table as well without having the user add it.

I can see the attachment FileData, FileName and Filetype when I go into query view, but when I attempt to create an update query that will take the FileName and populate the new field, I get an error that states
Enter Parameter Value with the ReportAttach.FileName below.

Does anyone know how I can get the Filename into a new field
 

Checkbox OnUpdate to upload attachment, OnClick for label to view.

Preview
I have a single table with one record per person.
I have multiple training checkboxes that every person has to check yes, but only if they've completed the training.
On my table, there is a TrainingA Yes/No field and a TrainingA Certificate attachment field.
I want to have the checkbox require a certificate be uploaded to the attachment field to be marked as Yes, and if the label for the checkbox is clicked, the attachment to open (only if uploaded).
I'm pretty good with If/Then VBA, but outside of that I'm still learning. Just looking for a little help on getting this all to work.
 

Remove specific type of attachment from all records in table

Preview
I have table call "empTable" and it has an Attachment field called "Attachment". Some of the records has empty Attachment field and some record has one attachment and some has two and the attachment types are jpeg and pdf.

I want to remove all the pdf from all the records in this table automatically with VBA or something,
 

Add a new record with attachment using VBA

Preview
At the submit button, I need the values to be updated to the table.

Here is the code for the "add record" that I created. I added this line MySet!trAttach = Attachment
in the code for Attachment and get an error "type mismatch".