I am trying to create a form that does the following on a new record:
Increment Field Value by 1
Repeat Date Field
Repeat Text Field
I can do the first 2 fine, but when I add the code for the text repeat, it stops working. Can someone look at the code below and tell me what I am doing wrong? Thanks in advance.
======================================================
Option Compare Database
Private Sub Tktdate_BeforeUpdate(Cancel As Integer)
Private Sub Tktnum_Enter()
intMax = DLookup("Max(tktnum)", "ticket detail"
intMax = intMax + 1
Me.Tktnum = intMax
End Sub
Private Sub Tktdate_AfterUpdate()
Me.Tktdate.DefaultValue = "#" & Me.Tktdate.Value & "#"
End Sub
Private Sub Form_Current()
Me.Product.DefaultValue = DLast("Product", "Ticket Detail"
End Sub
Increment Field Value by 1
Repeat Date Field
Repeat Text Field
I can do the first 2 fine, but when I add the code for the text repeat, it stops working. Can someone look at the code below and tell me what I am doing wrong? Thanks in advance.
======================================================
Option Compare Database
Private Sub Tktdate_BeforeUpdate(Cancel As Integer)
Private Sub Tktnum_Enter()
intMax = DLookup("Max(tktnum)", "ticket detail"
intMax = intMax + 1
Me.Tktnum = intMax
End Sub
Private Sub Tktdate_AfterUpdate()
Me.Tktdate.DefaultValue = "#" & Me.Tktdate.Value & "#"
End Sub
Private Sub Form_Current()
Me.Product.DefaultValue = DLast("Product", "Ticket Detail"
End Sub