error message

  • Thread starter Thread starter Ann
  • Start date Start date
A

Ann

I have a form with close button. The close button onclick
event has something like this:
------------------------------------------------
Dim Answer%
' check to see if all of the donors are entered, if
so set flag on frmDisclosureFilingEntry
Answer = MsgBox("Are all major donors entered?", 36,
CnDb)
If Answer = 6 And Isloaded
("frmDisclosureFilingEntry") Then Forms
("frmDisclosureFilingEntry")!DonorsIn = True

DoCmd.Close A_FORM, "frmDonorEntry"
-------------------------------------------------
The problem is when I click yes in message box, it gives
error message: you cannot assign a value to this object.

I use debug and find the problem is at :
If...Then Forms("frmDisclosureFilingEntry")!DonorsIn =
True

I cannot figure out what is wrong with here?

Any ideas?

Thanks in advance
 
Ann said:
Dim Answer%
' check to see if all of the donors are entered, if
so set flag on frmDisclosureFilingEntry
Answer = MsgBox("Are all major donors entered?", 36,
CnDb)
If Answer = 6 And Isloaded
("frmDisclosureFilingEntry") Then Forms
("frmDisclosureFilingEntry")!DonorsIn = True

DoCmd.Close A_FORM, "frmDonorEntry"
-------------------------------------------------
The problem is when I click yes in message box, it gives
error message: you cannot assign a value to this object.

I use debug and find the problem is at :
If...Then Forms("frmDisclosureFilingEntry")!DonorsIn =
True

Ann,

does the form allow data editing (see property AllowEdit)?
Is the control DonorsIn activated?
Is DonorsIn a calculated field having some function or expression as
ControlSource?

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 
Back
Top