Results 1 to 2 of 2
  1. #1
    Alphix is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    61

    How do I input a value in a field box one at a time with one button?

    How do I input a value in multiple field boxes one at time using one button at click?

    I am not able to code it to recognize an empty field box.

    Is there a way???

    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Treat the attachment field as a recordet

    Code:
    Private Sub btnAddAt_Click()
    Dim rst   'As Recordset
    Dim rst2Att
    Set rst = CurrentDb.OpenRecordset("SELECT * FROM Contacts WHERE (((Contacts.ID)=2))")
     rst.Edit
     
     Set rst2Att = rst.Fields("Attachments").Value
        ' Add a new attachment.
       rst2Att.AddNew
       rst2Att.Fields("FileData").LoadFromFile "\\server\folder\spiderman.png"
       rst2Att.Update
     
    rst.Updat
    rst.Close
    Set rst = Nothing
    Set rst2Att = Nothing
    End Sub

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

Similar Threads

  1. Time Input mask - arrgh!
    By Sheba in forum Forms
    Replies: 1
    Last Post: 09-16-2014, 01:43 PM
  2. Replies: 1
    Last Post: 04-25-2012, 12:36 PM
  3. Replies: 7
    Last Post: 08-04-2011, 07:49 PM
  4. Replies: 11
    Last Post: 06-02-2011, 10:21 AM
  5. Replies: 1
    Last Post: 09-13-2010, 01:57 PM

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