V
vb_Dumb
I have two forms the main form has a text box for a record number it
also has a command button to open the second form the second form has
a text box that generates a record number with this code in the form's
before update event i need code or something that when i click to open
the second form it needs to look at the last number of the text box
and add one and insert it back in the first forms text box thanks in
advance.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.NewRecord Then
If RecordsetClone.RecordCount = 0 Then
Me.DMRnumbertxt = "1"
Else
Me.DMRnumbertxt = Nz(DMax("[DMR Number]", "[ETP Table]"), 0) + 1
End If
End If
End Sub
also has a command button to open the second form the second form has
a text box that generates a record number with this code in the form's
before update event i need code or something that when i click to open
the second form it needs to look at the last number of the text box
and add one and insert it back in the first forms text box thanks in
advance.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.NewRecord Then
If RecordsetClone.RecordCount = 0 Then
Me.DMRnumbertxt = "1"
Else
Me.DMRnumbertxt = Nz(DMax("[DMR Number]", "[ETP Table]"), 0) + 1
End If
End If
End Sub