Aeon.Divine
< Random Learner. >
- Local time
- Today, 11:42
- Joined
- Mar 25, 2008
- Messages
- 55
Hi there,
Lest get straight to the problem. I've bumped myself into a slight inconvenient trying to design a simple vb module which would autofill a serial number into a textbox on a form when i click over it. The structure of my serial number is MM-AA-XXXXX ( When MM is the current month, AA is the current year, and XXXXX is a 5 digit number equal to my main field. I need the field to block itself upon autocompleting itself, to ensure my field wont refill with a future date later.
I have already tried myself, but im sure my final code is completely wrong, ill paste it here just in case.
Private Sub Codigo_Enter()
FIELDNAME.Locked = False
FIELDNAME.Text = str(month(date))+str(year(date))+idordenes.text
FIELDNAME.Locked = True
End Sub
idordenes is the name of my main field ( autonumeric )
This module should autocomplete my field with the current month, year and main field value, and block it so it wont be editable any longer.
Many thanks in advance. ^^
Lest get straight to the problem. I've bumped myself into a slight inconvenient trying to design a simple vb module which would autofill a serial number into a textbox on a form when i click over it. The structure of my serial number is MM-AA-XXXXX ( When MM is the current month, AA is the current year, and XXXXX is a 5 digit number equal to my main field. I need the field to block itself upon autocompleting itself, to ensure my field wont refill with a future date later.
I have already tried myself, but im sure my final code is completely wrong, ill paste it here just in case.
Private Sub Codigo_Enter()
FIELDNAME.Locked = False
FIELDNAME.Text = str(month(date))+str(year(date))+idordenes.text
FIELDNAME.Locked = True
End Sub
idordenes is the name of my main field ( autonumeric )
This module should autocomplete my field with the current month, year and main field value, and block it so it wont be editable any longer.
Many thanks in advance. ^^