Results 1 to 2 of 2
  1. #1
    kirky is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    43

    Post Copy Field Values base on unbound textbox in filtered continuous form

    Sir / Maam:



    Good day!

    I am sorry if just now again i come to visit on the page. I was stack up again in my updates of access database. Could you please help me for this to work as per my desire output. any ideas will do.

    I have a continuous form where the users will filter as per shipment no and then update the ETA field. There's a lot of records to update and fill ETA field and they want to have an unbound text box where they can put the date and copy that date into ETA fields for all filtered record. How can I do it? I am new to vba and i am trying to satisfy the users needs.

    I have here the form as reference and a code i found but i cant do anything to make it work.

    I hope somebody help me for this.


    Thank you so much


    Code:
    Dim rst As DAO.Recordset
    Dim varBK As Variant, dblDate As Date, varDate
    
    Dim strMSG As String
    
    strMSG = ""
    
    If IsNull(txtETA) Then
      varBK = Me.Bookmark
    
      Set rst = Me.RecordsetClone
    
      rst.Bookmark = varBK
    
      rst.MovePrevious
    
      If rst.BOF Then
        strMSG = "On First Record" & vbLf & "Cannot Update from Previous Record"
      Else
        varDate = rst("txtETA")
        If IsNull(varDate) Then
        strMSG = "Previous Record has NO Date, cannot Update"
        Else
            dblDate = varDate
            txtETA = dblDate
        End If
      End If
      rst.Close
      Set rst = Nothing
    End If
    
    
    
    If strMSG <> "" Then
        MsgBox strMSG
    End If
    End Sub
    Attached Thumbnails Attached Thumbnails material.JPG  

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    You would not use vb. run an update query to update all records at once.

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

Similar Threads

  1. Replies: 2
    Last Post: 11-26-2015, 01:24 PM
  2. Replies: 2
    Last Post: 09-23-2015, 02:50 PM
  3. Continuous Form unclickable once filtered
    By KyleMac in forum Forms
    Replies: 5
    Last Post: 11-17-2014, 03:30 PM
  4. Replies: 13
    Last Post: 04-16-2014, 10:11 AM
  5. More than One Record on filtered Continuous Form
    By Williams485 in forum Forms
    Replies: 3
    Last Post: 03-13-2013, 04:56 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