I'm new at this but have managed to get a recordset using the following:
Private Sub cmdRunM1_Click()
On Error GoTo Err_cmdRunM1_Click
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim qdf As DAO.QueryDef
Set db = CurrentDb()
Set qdf = db.QueryDefs("Query1")
qdf(0) = [Forms]![form1]![Text1]
Set rs = qdf.OpenRecordset(dbOpenDynaset)
MsgBox qdf.Name & ":" & rs!TrainingID & " " & rs!EmployeeID & " " & rs!CourseID
Exit_cmdRunM1_Click:
Exit Sub
Err_cmdRunM1_Click:
MsgBox Err.Description
Resume Exit_cmdRunM1_Click
End Sub
How do I now get this information into a form so that I can work with the data?
tks,
mlswyo
Private Sub cmdRunM1_Click()
On Error GoTo Err_cmdRunM1_Click
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim qdf As DAO.QueryDef
Set db = CurrentDb()
Set qdf = db.QueryDefs("Query1")
qdf(0) = [Forms]![form1]![Text1]
Set rs = qdf.OpenRecordset(dbOpenDynaset)
MsgBox qdf.Name & ":" & rs!TrainingID & " " & rs!EmployeeID & " " & rs!CourseID
Exit_cmdRunM1_Click:
Exit Sub
Err_cmdRunM1_Click:
MsgBox Err.Description
Resume Exit_cmdRunM1_Click
End Sub
How do I now get this information into a form so that I can work with the data?
tks,
mlswyo