Ok, I've got the code below working, but I need to add some data from other tables. The select statement can have multiple from clauses?
I can't find it in ACCESS help, and the book I ordered from Amazon is in the mail !
Private Sub Command13_Click()
Dim dbs As DAO.Database
Dim qdf As DAO.Querydef
Dim strSQL As String
Dim lkval As String
Dim jones As String
Dim james As String
james = Format(Now, "mdyyhss"
Set dbs = CurrentDb
lkval = PO_number.Value
jones = "po#_query" & "_" & lkval & "_" & james
----------------
strSQL = "SELECT * FROM po_table WHERE po_num = " & Chr(34) & lkval & Chr(34)
Set qdf = dbs.CreateQueryDef(jones, strSQL)
End Sub
I can't find it in ACCESS help, and the book I ordered from Amazon is in the mail !
Private Sub Command13_Click()
Dim dbs As DAO.Database
Dim qdf As DAO.Querydef
Dim strSQL As String
Dim lkval As String
Dim jones As String
Dim james As String
james = Format(Now, "mdyyhss"
Set dbs = CurrentDb
lkval = PO_number.Value
jones = "po#_query" & "_" & lkval & "_" & james
----------------
strSQL = "SELECT * FROM po_table WHERE po_num = " & Chr(34) & lkval & Chr(34)
Set qdf = dbs.CreateQueryDef(jones, strSQL)
End Sub