Run-time error 2448 You can't assign a value to this object (1 Viewer)

nika.duncan

Registered User.
Local time
Today, 11:09
Joined
Sep 23, 2013
Messages
10
Hi all,
Having an issue that a need assistance with, first time posting and I am new to the coding as well. I am trying to use Access 2007 popup calendar to populate a combo box with a selected date. When I select the date on the calendar the above error appears. No sure how to fix it I have included the code below highlighting the line on which it errors out. Any help is welcomed.
Thanks.
Code:
Private Sub Calendar9_Click()

'Set Date to the selected date and hide the clalendar.
[COLOR=Red]MAssBDate.Value = Calendar9.Value[/COLOR]
MAssBDate.SetFocus
Calendar9.Visible = False
End Sub

Private Sub MAssBDate_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

'Show Calendar and set it's date
Calendar9.Visible = True
Calendar9.SetFocus

'Set to today if UsrInfoBDate has no value

Calendar9.Value = IIf(IsNull(MAssBDate), Date, MAssBDate.Value)

End Sub
 
Last edited:

pr2-eugin

Super Moderator
Local time
Today, 18:09
Joined
Nov 30, 2011
Messages
8,494
Hello nika.duncan, Welcome to AWF :)

What is the Control Source of the ComboBox? What are the properties of the combo box.. i.e. Column width, Column Count, Bound Column?
 

nika.duncan

Registered User.
Local time
Today, 11:09
Joined
Sep 23, 2013
Messages
10
Hi pr2-eugin,
The control source for the combo box was MAssBDate which I have removed and this has seem to fix the error.
Thanks for the help.
 

Users who are viewing this thread

Top Bottom