Adding data from one form to another form

G

Guest

I am hoping some one can help me with this...

I have a form for participants of an event. I have another form for
registrations for that event. When I click my register button, I want to be
able to carry forward some of the information from the participant form to
the new form in a new record. I have been able to get to the registration
form, add the name to the registration form from the participant form but it
just adds it into an existing record, a new record is not created. Can
anyone tell me what the visual basic code would be for this problem?

Thanks!!!!
 
G

Guest

Here are two options for you to try:

First try opening the registration for with this command:

DoCmd.OpenForm "frmRegistrations", acNormal, , , acFormAdd

This will open the form for data entry only. If you set th values as you
have explained, they should be in a new record.

If that does not work for you or if you want to be able to look at other
records, try this:
DoCmd.OpenForm "frmRegistrations", acNormal, , , , , "New"

In the registration form, add the following code:

Private Sub Form_Load()
If Me.OpenArgs = "New" Then
Me.Recordset.AddNew
End If
End Sub

Either option should work to get you to a new record.
 

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