Experiment with the code result.
As promised, this is for the information of Bob and Roy if you are interested, I do not expect a response. I experimented with the combinations and please excuse any errors in my description of the problem. I am a part time access user tinkering with programs developed for work and home.
I have a subform with text boxes for ChronoDate (Date/Time) and ChronoDay (Text). To get the relevant day in the Chronoday, I used the code above in the On Exit of ChronoDate.
To try the suggested code I changed CDay to a Date/Time field in the Table and the code Format([ChronoDate], “dddd”) in the OnExit event for CDate.
I also put dddd in the Format if the text box for CDay.
I then saved it and went into the main form with the above subform and entered a date in the Cdate field. On exit I received the following VB error:
“Run-time error ‘-2147352567 (80020009)’:
The value you entered isn’t valid for this field.
I then tried the code output to an unbound textbox with dddd in Format and it worked except it recorded the same day for all of the records despite the previously entered dates.
It may be obvious to some but I am lost for an explanation so I have gone back to the “two level functions” which I know works however not as efficiently.
Thanks again.
Allan