RickSchadt
Technical User
I have a pop-up form that carrys some data with it from the originating form (customer number specifically), When I pop up the form I want it to go to a new record, but I also want the customer number carried with it. I'm a VBA newby, but essentially what I want to do is after the form goes to the acNewRec I want to fill the cust_number with the cust_number_main data.
Private Sub Command40_Click()
On Error GoTo Err_Command40_Click
Dim stDocName As String
stDocName = "Transfer Form"
DoCmd.OpenForm stDocName
DoCmd.GoToRecord acActiveDataObject, , acNewRec
Exit_Command40_Click:
Exit Sub
Err_Command40_Click:
MsgBox Err.Description
Private Sub Command40_Click()
On Error GoTo Err_Command40_Click
Dim stDocName As String
stDocName = "Transfer Form"
DoCmd.OpenForm stDocName
DoCmd.GoToRecord acActiveDataObject, , acNewRec
Exit_Command40_Click:
Exit Sub
Err_Command40_Click:
MsgBox Err.Description