Next Letter using ASCII codes
---
Hi John,
you can use the ASCII codes -- provided you won't have more than 26
versions
The ASCII code for A is 65
(American Standard Code for Information Interchange)
chr(65) gives you 'A'
asc("a") gives you 65
'~~~~~~~~~~~~~~~~~~~~~~~
'find the first value that matches current record
'in a clone of the form recordset
Me.RecordsetClone.FindFirst "IDfield = " & me.IDfield
'if there is no previous record, assign 'A'
if me.RecordsetClone.bof then
me.Version_controlname = "A"
else
'go to previous record in RecordsetClone
'which is same as previous record in the form
Me.RecordsetClone. MovePrevious
'assign current version to next letter
me.Version_controlname = chr( asc(Version_controlname) + 1)
end if
'~~~~~~~~~~~~~~~~~~~~~~~
where
IDfield is the name of your primary key -- ie: SalesID, EstID, etc
Warm Regards,
Crystal
*

have an awesome day

*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*