Transfering data from one form to another

  • Thread starter Thread starter owaint
  • Start date Start date
O

owaint

Guest
Probably the best way of describing my problem is to talk you through the scenario so here goes:

User is entering data via a Form.
Half way through entering the data s/he realises that they need to include some
'additional comments' for this record.
The 'Standard Form' does not show this field as it is designed for a stanard record not an 'extended' record (this is due to a requirement that the standard form can print out on one page).
The user clicks on a button entitled 'I need to make additional comments' and a second form opens with all the same fields as the Standard Form but this second form has an 'additional comments' text box. (I've got it working up to this point).
BUT, the user has to re-enter all the data that they have already entered on the
standard form into the second or 'extended') form.

Is there a way of making it so when the user clicks on my command button that opens the second form it also cuts any data they have already entered in the 'Standard Form' and pastes it into the 'Extended Form'? I will then get it to delete the original Standard Form to avoid duplication of data.

By the way - I need to keep it so that there is only one table, the forms just show different fields of that one table.

Any suggestions on this would be very gratefully appreciated.

Thanks.
 
On your command button you will need to have some coding that will help. This is the coding on mine and hopefully this will guide you in the right direction. The "stlinkcriteria" is the part that links the forms together.

Private Sub Edit_Orders_Click()
On Error GoTo Err_Edit_Orders_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Edit Orders"

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

Exit_Edit_Orders_Click:
Exit Sub

Err_Edit_Orders_Click:
MsgBox Err.Description
Resume Exit_Edit_Orders_Click

End Sub
 

Users who are viewing this thread

Back
Top Bottom