Kamis, 04 Agustus 2011

[MS_AccessPros] Placing button on form to make new record in subform

 

Hi all,

I need to place a button on my main form to create a new record in my
subform. I found this code online, but cannot get it to work.

1. Private Sub YourButton_Click
2. If Me!YourSubformControl.Form.Dirty Then
3. Me!YourSubformControl.Form.Dirty = False
4. End If
5.
6. Me!YourSubform.SetFocus
7.
8. DoCmd.GoToRecord , , acNewRec
9.
10. End Sub

I'm not sure what the YourSubformControl means?

Thank you,

Deb

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar