Results 1 to 2 of 2
  1. #1
    postingart is offline Novice
    Windows XP Access 2016
    Join Date
    Jun 2021
    Posts
    2

    attachment file vba query (Add, Edit, Delete)

    I want to attached image and save attached image in specific folder by using vba query
    i want to add edit and delete query regarding attachment file.

    This is save button code

    Code:
    Private Sub cmdSave_Click()
    On Error GoTo err_msg
    
    CurrentDb.Execute "INSERT INTO ImageList (ImgTitle,ImgPath) VALUES('" & Me.ImgTitle.Text & "','" & Me.ImageTitle.Picture & "') ", dbFailOnError
    CurrentDb.Close
    
    MsgBox " Data Has Been Saved Successfully ", vbInformation + vbOKOnly, canMnu
    Me.ImgTitle.Text = ""
    Me.ImageTitle.Picture = ""
    
    
    Exit Sub
    err_msg:
    MsgBox Err.Source & " " & Err.Number & " - " & Err.Description, vbCritical + vbOKOnly, "Error"
    End Sub


  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Search, edit and delete in access
    By newstudent in forum Forms
    Replies: 1
    Last Post: 07-05-2017, 09:12 PM
  2. Replies: 7
    Last Post: 12-04-2015, 10:50 AM
  3. Prevent edit or delete data or records from a table
    By mosquito_admin in forum Security
    Replies: 1
    Last Post: 03-01-2012, 06:02 PM
  4. Replies: 2
    Last Post: 12-22-2011, 07:53 PM
  5. Prevent edit and delete after printing a form
    By damie in forum Database Design
    Replies: 10
    Last Post: 01-11-2011, 06:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums