Sending VBA to Subform Via button in Form?

rodvaN

Registered User.
Local time
Yesterday, 19:40
Joined
May 20, 2009
Messages
92
Hello there..
Is it possible to send values from a button on a form to a subform data?
For example, If I mark data from a checkbox inside the subform, then I click on button on the form.. it will check for True values on checkboxes I just marked, if it is true, then it will write a number from a value in fieldbox on form.
Example:
Form: Products
Subform: ExpiredProducts
Field on "Products" Form, Number of expiration.(It will automatically generate).
Then I mark on cheboxes inside "ExpiredProducts" subform.
Then click Update Button on "Products" form, that will check for True values (Data I just marked). If there are true values, then it will automatically add the "Number of expiration" to a column from the subform. and Mark other checkboxes.

I hope I made myself clear.
Thanks in advance.
 
Hey, I found how..

Private Sub Command1_Click()
If Me!subform2.Form!chkbox = True Then
Me!subform2.Form!Number = "777"
Me!subform2.Form!chkbox2 = True
End If

End Sub


Just how can I make a repeat form, cause it only put the data to the first line and it wont continue marking and putting the number in all the true chkboxes.
 

Users who are viewing this thread

Back
Top Bottom