You could use the
Dmax()+1 to increment your ID and use
While/Wend statement to loop[ through your procedure a set number of times.
The attached sample should help you with the Dmax() function.
Wowwwww, this is very useful. thank you so much that.
But i also have another small problem with the following code of mine:
Private Sub Form_Current()
Me.txtStartno.SetFocus
If Me.cbLotno = 0 Or IsNull(Me.cbLotno) Then
Me.cbproducer.Locked = True
Me.cbproducer.Enabled = False
Else
Me.cbproducer.Locked = False
Me.cbproducer.Enabled = True
End If
End Sub
The problem is that when cbLotno = null is correct but when
cbLotno = value (number) a cbproducer is still locked and disabled till i switch to design view and switch back to form view then a cbproducer becomes functional.
Do you have idea about this please?
Cheers,