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