Carrry over form values.
I am a VBA UberNewb, and need help. I need to revise an entry form to carry over 2 text box values from the previous record. One is an ID number, and the other is the date associated with that ID number. I want the Add Record button to open a new record with these fields pre-populated. Here is the code associated with AddRecord click:
************************************
Private Sub cmdAdd_Click()
On Error GoTo Err_cmdAdd_Click
DoCmd.GoToRecord , , acNewRec
Exit_cmdAdd_Click:
Exit Sub
Err_cmdAdd_Click:
MsgBox Err.Description
Resume Exit_cmdAdd_Click
End Sub
*********************************************
Do I need to add code here? Please be explicit in reply. In three days of web-digging I have not found a simple solution that I can understand.
|