I am entirely self taught on this and have no previous programming experience. Funnily enough, learning how to do this with quieries is exactly what I am trying to get at, but thanks.
Hi,
I have been trying to use queries to retrieve data from other forms and have failed miserably. I have therefore cobbled together the following code to do the job instead (see below). My question is: Would it simply the code if I were to use quieries instead? or is it worth changing it to...
Scratch my last reply, using the suggestions you made it is all working fine. Below is the working code for anyone following the thread.
Thanks Again
Private Sub STAFFDeptCommand_Click()
Dim STAFFDept As String
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim qdf As DAO.QueryDef
STAFFDept =...
Thanks for the welcome and the speedy reply
The SQL view for the query shows:
SELECT DEPARTMENTTable.Department AS DEPARTMENTTable_Department
FROM DEPARTMENTTable INNER JOIN STAFFLISTTable ON DEPARTMENTTable.ID = STAFFLISTTable.Department
GROUP BY DEPARTMENTTable.Department...
Hi
I am running a select query from VBA (i think) and would like to use the select query result as a variable for something else. This is what I have atm. FYI STAFFDept is a numerical value relating to the ID number in the DEPARTMENTTable.
Dim STAFFDept
Dim stDocName As String
Dim db As...