I have one form and 2 buttons... on the first tab, I have
a button for adding customers, which opens the form in add
mode. The "On Click" code is:
************************
Private Sub AddCustomer_Click()
On Error GoTo Err_AddCustomer_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCustomer"
DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria,
acFormAdd
Exit_AddCustomer_Click:
Exit Sub
************************
For the second tab, I use a button to open the field in
edit mode, and the code for this "On Click" is:
************************
Private Sub EditCustomer_Click()
On Error GoTo Err_EditCustomer_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCustomer"
DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria,
acFormEdit
Exit_EditCustomer_Click:
Exit Sub
************************
The difference is the 'acFormEdit' versus the 'acFormAdd'
in the two.
hope this helps...
jh