Set value based on dat entry in another form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
On my main entry form I have a check box ("Has Complaint") and when the user
clicks on cmdAddComplaint (opening frmComplaint in add mode) the check box is
set to true. If for some reason there is no complaint added and they close
frmComplaint, returning to the main entry form, how can I reset the check box
to false.
Thank You,
Nick
 
Nick X said:
On my main entry form I have a check box ("Has Complaint") and when the user
clicks on cmdAddComplaint (opening frmComplaint in add mode) the check box is
set to true. If for some reason there is no complaint added and they close
frmComplaint, returning to the main entry form, how can I reset the check box
to false.


Don't set the check box's Value.

Instead, set its DefaultValue to True (in design view).
 
Nick,

Setting the check box back to false is not a problem:
chkBoxName = Null
or
chkBoxName = ""
(not sure which is preferred, I'm not an Access guru)

You didn't mention if the check box is bound to a field in a table or not.

But you need to come up with the criteria for how you know that no complaint
was added. You can do this in frmComplaint and put the code to clear the
check box in the Close event of frmComplaint:
If yourCriteria = False Then
Forms!NameOfForm!chkBoxName = Null
End If

Good Luck!
Judy
 
Back
Top