123dstreet
Registered User.
- Local time
- Today, 07:40
- Joined
- Apr 14, 2010
- Messages
- 122
Hi All! I am having a little trouble finishing this code: I created a button on my sales order Form, when clicked, it opens a new form. On the sales order form there is an Order ID #. On the new form, there is a field for that Order ID #. What I want is for that new form to open and automatically have the Order ID # from the Sales Order Form go into that field. Any thoughts would be appreciated! thanks in advance!
Code:
Private Sub Upgrades_Click()
On Error GoTo Err_Upgrades_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Upgrades (Form)"
stLinkCriteria = "[Sales Order]=" & Me.Order_ID
DoCmd.OpenForm stDocName, , , stLinkCriteria
[COLOR=red][/COLOR]
[COLOR=#ff0000]What do I put here to make this code work?[/COLOR]
[COLOR=#ff0000][/COLOR]
Exit_Upgrades_Click:
Exit Sub
Err_Upgrades_Click:
MsgBox Err.Description
Resume Exit_Upgrades_Click
End Sub