Yeah, I know its a lot of work but the end users are going to need it as simple as possible to use.
I changed a few things,
The Combo box control source is now pointing to !Table!Field, the remainder of the code in both the calendar and the combo box point to the combo box.
I get the message Run Time Error 2447
There is an invalid use of the .(dot) or ! operator or invalid parenthesis
You may have entered an invalid identifier or typed parentheses following a null constant.
The highlighted section in debug is.
calendar.Value = IIf(IsNull(effectdate), Date, effectdate.Value)
I got this in the test database but fixed it by changing the control source to just the name as opposed to the =!table!field bit.
But when I do this I get another run time error telling me The expression you entered has a field , control or Property name that access cnnot find (Run time 2424)
This is the code
effectdate is the combo name
Private Sub effectdate_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'show Calendar and set its date.
calendar.Visible = True
calendar.SetFocus
'Set to today if effectdate has no value.
calendar.Value = IIf(IsNull(effectdate), Date, effectdate.Value)
End Sub
At the end of my tether !!!