Using Alan's example you could paste the following into the AfterUpdate event of the textbox the user is typing a date into. Let's say the name of that textbox control is, "TextBoxName".
Code:
dim dtInput as date
dtInput = me.TextBoxName.Value
me.OtherTextBoxName.Value = Right(CStr(Year(dtInput)),2) & CStr(dtInput-DateSerial(Year(dtInput),1,1))
As an alternative, using the function in the other post, you would paste the function in the form's module or in a Standard Module.
Code:
Function CDate2Julian(MyDate As Date) As String
CDate2Julian = Format(MyDate - DateSerial(Year(MyDate) - 1, 12, _
31), "000")
End Function
Then you would use something like the following in the afterupdate of TextBoxName ...
Code:
dim dtInput as date
dtInput = me.TextBoxName.Value
me.OtherTextBoxName.Value = CDate2Julian(dtInput)
ONe other thing to consider is that you are typically using the default value. So you might want to add some code in the OnCurrent event for the form ...
me.OtherTextBoxName.Value = Right(CStr(Year(Date)),2) & CStr(Date()-DateSerial(Year(Date()),1,1))
or
me.OtherTextBoxName.Value = CDate2Julian(Date)