Hi all
I am stuck on what should be a simple problem.
I am working with a database where the organisations unique ID for people starts with there date of birth in reverse order (yymmdd...)
In the flow of my form it is easiest to enter date of birth first.
In the after update event I would like to write some code to extract yymmdd from the Date of Birth already entered and then to set focus on the ID field after the entry of this data to allow completion of the unique ID.
I have tried:
Dim Yr2Dig As Integer, Mnth2Dig As Integer, Day2Dig As Integer
Yr2Dig = Format([DOB], "yy")
Mnth2Dig = Format([DOB], "mm")
Day2Dig = Format([DOB], "dd")
Where DOB is the DOB txt field.
When I debug this the variables just contain the digit 0
Any thoughts on what needs to be done?
cheers
Z
I am stuck on what should be a simple problem.
I am working with a database where the organisations unique ID for people starts with there date of birth in reverse order (yymmdd...)
In the flow of my form it is easiest to enter date of birth first.
In the after update event I would like to write some code to extract yymmdd from the Date of Birth already entered and then to set focus on the ID field after the entry of this data to allow completion of the unique ID.
I have tried:
Dim Yr2Dig As Integer, Mnth2Dig As Integer, Day2Dig As Integer
Yr2Dig = Format([DOB], "yy")
Mnth2Dig = Format([DOB], "mm")
Day2Dig = Format([DOB], "dd")
Where DOB is the DOB txt field.
When I debug this the variables just contain the digit 0
Any thoughts on what needs to be done?
cheers
Z