Command button problem

S

Steven

i have the following code:
Private Sub Payments_Click()

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Payments"

stLinkCriteria = "[EnrollmentID]=" & Me![EnrollmentID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

The button, called Payments, exists on a form called Enrollment and once
clicked opens a form (payments) that show all payments associated with that
enrollment. That works but if i click new (arrow asterisk) to add a new
payment the EnrollmentID does not get captured for the insert. I need the
payment form to complete the insert with the EnrollmentID from the previous
form. Please help, thanks.
 

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