Using a Checkbox to Update a Field in a Subform

M

Mark Jackson

Hello,

I have a form and a subform that share two fields. Is there a way when the
checkbox on the form is checked it will automatically insert the information
from the two fields on the form into the same two fields on the subform? I
use the checkbox when I submit a quote to a customer. The form is called
Solicitations and the subform is called Quotes.

Thanks in advance.
Mark
 
T

Tony Vrolyk

Are you familiar with VBA/Event proceduers? You could use the AfterUpdate
event of the check box to do something like (replace with your control
names)

If Me.chkBox = -1 then
Me!Quotes.Form!Control1= Me.Control1
Me!Quotes.Form!Control2= Me.Control2
End if

If you want to have the fields cleared if the users unchecks you could add
to it like this

If Me.chkBox = -1 then
Me!Quotes.Form!Control1= Me.Control1
Me!Quotes.Form!Control2= Me.Control2
Else
Me!Quotes.Form!Control1= Null
Me!Quotes.Form!Control2= Null
End if


good luck
Tony
 
Top