Hi Guys,
I am using the following code to increment numbers;
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("SELECT [Sequence_No] FROM Quote_Number"
rst.MoveFirst
With rst 'Edit recordset object
.Edit 'Edit the field
![Sequence_No] = ![Sequence_No] + 1 'Increment by one
seq = ![Sequence_No]
.Update 'Save changes
End With
Does anyone know how I might adapt this to be able to increment letters to take the current letter and the replace it with the next letter in the alphabet i.e a becomes b, b becomes c, etc???
[Cheers]
I am using the following code to increment numbers;
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("SELECT [Sequence_No] FROM Quote_Number"
rst.MoveFirst
With rst 'Edit recordset object
.Edit 'Edit the field
![Sequence_No] = ![Sequence_No] + 1 'Increment by one
seq = ![Sequence_No]
.Update 'Save changes
End With
Does anyone know how I might adapt this to be able to increment letters to take the current letter and the replace it with the next letter in the alphabet i.e a becomes b, b becomes c, etc???
[Cheers]