98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access VBA Training and help » SQL query in VBA for DAO recordset
SQL query in VBA for DAO recordset
Resolved · Urgent Priority · Version 2003
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
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Hiding Multiple Table columnsIf you want to hide non-adjacent Access table columns. In Datasheet view, open the table that contains the columns you want to hide. |