Set value based on dat entry in another form

N

Nick X

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
 
M

Marshall Barton

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).
 
J

Judy Ward

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top