J
Johnny
Hi,
I am trying to get into my code an expression syntax that when the from
opens it clears the form for new data to be entered. In the line
doCmd.OpenForm stDocName, , , stLinkCriteria at the end of this
statement is where I wanted to add the acaddform syntax but when I do
and open the form and fill in the data and then close and save it does
not save the data. If I take the syntax out of the statement and open
the form and enter the data and then close it saves the data for me. I
am needing find the expression that will allow the data to be saved.
Thanks
Johnny
Private Sub Command30_Click()
On Error GoTo Err_Command30_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "OrderMain"
stLinkCriteria = "[ContactID]=" & Me![ContactID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command30_Click:
Exit Sub
Err_Command30_Click:
MsgBox Err.Description
I am trying to get into my code an expression syntax that when the from
opens it clears the form for new data to be entered. In the line
doCmd.OpenForm stDocName, , , stLinkCriteria at the end of this
statement is where I wanted to add the acaddform syntax but when I do
and open the form and fill in the data and then close and save it does
not save the data. If I take the syntax out of the statement and open
the form and enter the data and then close it saves the data for me. I
am needing find the expression that will allow the data to be saved.
Thanks
Johnny
Private Sub Command30_Click()
On Error GoTo Err_Command30_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "OrderMain"
stLinkCriteria = "[ContactID]=" & Me![ContactID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command30_Click:
Exit Sub
Err_Command30_Click:
MsgBox Err.Description