Access Help - Pulling data from Query into a form
We have a database that we keep track of all of our projects and the percentage they are complete. I have created a form that runs a query to pull up all the projects that are not yet complete based on the employee you choose. I now what to update this form to add up the hours of work remaining on each project, from the query and display the results back on the original form, but I have no idea how to access this data.
Here is the code I have to run the query now I want to add the additional code to access the query data and put it back into the form...any suggestions would be greatly appreciated....FYI I am very new to Access so I have no clue what I am doing! I would think there is some way to loop through the query to add up the values but I'm not sure about the codes??
Private Sub Run_AllDates_AllEmployees_Click()
On Error GoTo Err_Run_AllDates_AllEmployees_Click
Dim stDocName As String
stDocName = "Manpower_AllDates_AllEmployees"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Run_AllDates_AllEmployees_Click:
Exit Sub
Err_Run_AllDates_AllEmployees_Click:
MsgBox Err.Description
Resume Exit_Run_AllDates_AllEmployees_Click
End Sub
We have a database that we keep track of all of our projects and the percentage they are complete. I have created a form that runs a query to pull up all the projects that are not yet complete based on the employee you choose. I now what to update this form to add up the hours of work remaining on each project, from the query and display the results back on the original form, but I have no idea how to access this data.
Here is the code I have to run the query now I want to add the additional code to access the query data and put it back into the form...any suggestions would be greatly appreciated....FYI I am very new to Access so I have no clue what I am doing! I would think there is some way to loop through the query to add up the values but I'm not sure about the codes??
Private Sub Run_AllDates_AllEmployees_Click()
On Error GoTo Err_Run_AllDates_AllEmployees_Click
Dim stDocName As String
stDocName = "Manpower_AllDates_AllEmployees"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Run_AllDates_AllEmployees_Click:
Exit Sub
Err_Run_AllDates_AllEmployees_Click:
MsgBox Err.Description
Resume Exit_Run_AllDates_AllEmployees_Click
End Sub