Hi engineer,
combobox:
Name --> FLetter
RowSourceType --> Value List
RowSource --> A;B;C;D;E
AfterUpdate --> =MakeField()
testboxes:
Name -- FNumber
Format --> 00000
AfterUpdate --> =MakeField()
Name --> Fieldname
ControlSource --> Fieldname
code behind the form:
'~~~~~~~~~~~~~~~~
private function MakeField()
if isnull(FLetter) _
or isnull(FNumber) then
me.fieldname = null
exit sub
end if
me.fieldname = FLetter _
& format(FNumber, "00000")
end function
'~~~~~~~~~~~~~~~~
and, then each time a record changes, use the form Current event to fill
out the 2 unbound controls for collecting data:
'~~~~~~~~~~~~~~~~
if isnull(me.fieldname) then
me.FLetter = null
me.FNumber = null
exit sub
end if
me.FLetter = left(me.fieldname,1)
me.FNumber = cLng(mid( me.fieldname,2, _
len(me.fieldname)-1 ))
'~~~~~~~~~~~~~~~~
Warm Regards,
Crystal
*
have an awesome day
*
MVP Access
Remote programming and Training
strive4peace2006 at yahoo.com
*