Applying VBA on subform fields?

rodvaN

Registered User.
Local time
Today, 05:59
Joined
May 20, 2009
Messages
92
Hello there, Im trying to apply vba into data on the subform, for example

Private Sub subform_Click()
Me.chkbox.Value = 0
Me.data.Value = ""
Me.Refresh
Subform2.Refresh

End Sub


I dont know it wont work.. It is for creating an automatic adder from subform to form, checking and adding data into it.
Anyone that could guide me ?
Thanks alot
 
I already read that, still dont know what to do, sorry Im newbie in VBA..
Just need to uncheck the chkbox when I click on the whole line :S
And erase the column value from data
 
If the code is ON the subform in question you would just use:
Code:
Me.chkbox.Value = False
Me.data.Value = ""
Me.Requery

If the code is on the main form then


Code:
With Me.YourSubformContainerNameHere.Form
    .chkbox.Value = False
    .data.Value = ""
    .Requery
End With
Not really sure what parts you have on your main form and what on your subform and what they have to do with each other. Your description is, for a lack of a better term, lacking.
 
can you explain what you are trying to do again

you have a main form and a continuous subform?

you want to get a total from the subform?

or something else?
 
still breaking my head to figure out something friendly and intuitive.
 
I can't view the pics until I go home. ImageShack is blocked at work.
 
Dang.. ill make it up to fix it, do you have Yahoo Messenger or MSN messenger?.. would really appreciatte dedicated help, I can pay via paypal ..
 

Users who are viewing this thread

Back
Top Bottom