how to create a text sequence generator in ms access??
Maybe
Code:
Private Sub cmdgen_Click()
Dim sealnum As Integer
Dim strText As String
Dim techname As String
Dim TextSequence As String
techname = "WaterPump" '<<= this could be a reference to a control on the form
For sealnum = Me.box1 To Me.box2 '<-references to controls on the form
TextSequence = techname & sealnum
strText = "INSERT INTO sealinventorytbl (sealnum) VALUES ('" & TextSequence & "')"
' Debug.Print strText 'for debugging
CurrentDb.Execute strText.dbFailOnError
Next sealnum
End Sub
(Code based on rpeare's code from Post#3)
Note the text delimiters in the VALUES clause