Paul has attended:
Access VBA course
SQL query in VBA for DAO recordset
Hi,
I can't seem to get the sql statement "qrystring" below quite right. It should be selecting the field [AssignedTo] from the query [QrySnapshotSummary] where the value of field [Assigned To team] in the same table equals the conent of combo box [cmbTeam] on the current form, called frmTeamKPIs. The results of this query become rstusers DAO recordset.
Please help.
Regards
Paul
Private Sub cmbTeam_Change()
Dim rstusers As DAO.Recordset
Dim intcount As Integer
Dim qrystring As String
Set db = CurrentDb
qrystring = "SELECT qrySnapshotSummary.AssignedTo FROM qrySnapshotSummary GROUP BY qrySnapshotSummary.AssignedTo, qrySnapshotSummary.[Assigned to team] HAVING (((qrySnapshotSummary.[Assigned to team])=Forms!frmTeamKPIs!cmbTeam));"
Set rstusers = db.OpenRecordset(qrystring)
RE: SQL query in VBA for DAO recordset
Hi Paul
Further to your post we have had a look at this and this is something we can assist with in a consultative fashion as it is does exceed the scope of the forum.
We are confident that by following the steps below we can resolve your issue.
1) Forward your working files to us along with key objectives
2) We shall review and respond with estimate of cost
3) On agreement of scope and costs, we shall complete the work and return the files.
If you wish to discuss this further then please let us know.
Regards
Jacob