Hi All
I have the following code, which is designed to allow me to enter boldt suppliers and a box, each bolt has a sequential number on it with a prefix. Now the table I have has a field for the prefix and the bolt number, but is there a way I can adapt this code so that BoltNum = x Cane become BoltNum = Prefix and X (No spaces)
Private Sub Command30_Click()
Dim rs As Recordset, x As Integer
Set rs = CurrentDb.OpenRecordset("SELECT * FROM Seals WHERE 1=0")
For x = Me.StartRange To Me.EndRange
rs.AddNew
rs!BoltNum = x
rs!BoxID = Me.Box_ID
rs!SealTypes = Me.Seal_Types
rs!SupplierLookup = Me.Supplier
rs!Prefix = Me.Prefix
rs!DateAdded = Me.Date_Added
rs.Update
Next
End Sub
The result in the field now is
010
011
012 etc
What I want is
WW010
WW011
WW012
Any help greatly appreciated.