donnie051280
MIS
i created a form which is opened by a query. it displays several fields. I need to find a way to export/add these results into a new access table. I need to do by using a button..
thanks
thanks
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub Command16_Click()
On Error GoTo Err_Command16_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Form2"
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd
Exit_Command16_Click:
Exit Sub
Err_Command16_Click:
MsgBox Err.Description
Resume Exit_Command16_Click
End Sub
On Error GoTo Err_Command16_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Form2"
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd
Exit_Command16_Click:
Exit Sub
Err_Command16_Click:
MsgBox Err.Description
Resume Exit_Command16_Click
me.text1 = [forms]![form1]![text1]
me.text2 = [forms]![form1]![text2]
me.text2 = [forms]![form1]![text2]
INSERT INTO Name_of_Table( Text1, Text2 )
SELECT [forms]![form1]![txt1] AS Expr1, [forms]![form1]![txt2] AS Expr2;