I have the following code on a form so that when I enter an EndTime on one record the next new record has a default StartTime to match.
But, I have an error in my logic. This code only updates the StartTime in a new record. Because, there are times when I need to change an EndTime long after the record has been created, I need to modify this code so that if I update the EndTime of a record that update will go to the StartTime of the next record not just of the new record.Code:'Code by Dev Ashish http://www.mvps.org/access/forms/frm0012.htm Private Sub txtEndTime_BeforeUpdate(Cancel As Integer) Const cQuote = """" 'Thats two quotes Me!txtStartTime.DefaultValue = cQuote & Me!txtEndTime.Value & cQuote End Sub
Unfortunately I'm very clueless when it comes to VBA and don't know what I need to do so that I actually am updating pre-existing records. I saw a post on here that started to address this I think but there was no solution.
https://www.accessforums.net/access/d...ata-11171.html
Any help is greatly appreciated.