Search results

  1. D

    ? simplifying code using quieries

    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.
  2. D

    ? simplifying code using quieries

    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...
  3. D

    Use a SELECT Query result in VBA

    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 =...
  4. D

    Use a SELECT Query result in VBA

    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...
  5. D

    Use a SELECT Query result in VBA

    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...
Back
Top Bottom