On my order form i have 4 command buttons, 3 for dates and 1 for a notes section. i have some code for this, but it seems when i enter data in the new form / calendar a new entry is created in my Orders table when it should be part of the order being entered.
this is the code i currently am using:
Private Sub OrderDate1_Click()
On Error GoTo Err_OrderDate1_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "OrderDateCal"
stLinkCriteria = "[OrderID]=" & Me![OrderID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OrderDate1_Click:
Exit Sub
Err_OrderDate1_Click:
MsgBox Err.Description
Resume Exit_OrderDate1_Click
End Sub
how can i make it store the info in the current order!?
this is the code i currently am using:
Private Sub OrderDate1_Click()
On Error GoTo Err_OrderDate1_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "OrderDateCal"
stLinkCriteria = "[OrderID]=" & Me![OrderID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OrderDate1_Click:
Exit Sub
Err_OrderDate1_Click:
MsgBox Err.Description
Resume Exit_OrderDate1_Click
End Sub
how can i make it store the info in the current order!?