azizrasul
Well-known Member
- Joined
- Jul 7, 2003
- Messages
- 1,304
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
I know very little about SQL so pardon my ignorance here.
I know that I can create an action query SQL statement and run it using RunSQL e.g.
DoCmd.RunSQL strSQL
How do create a SQL statement for a select query? Here's what I am trying to do: -
Forms![frmData Comparison].txtMatchedSTB_BE = DCount("TestString", strSQL)
where strSQL comes from a select query. The select query SQL code from the query SQL window is
SELECT tblSTB.TestString FROM tblSFF INNER JOIN tblSTB ON tblSFF.TestString = tblSTB.TestString;
In the past I have been trying to enter the query name in the DCount function, but I would like to gently begin doing things with SQL if I can.
I know that I can create an action query SQL statement and run it using RunSQL e.g.
DoCmd.RunSQL strSQL
How do create a SQL statement for a select query? Here's what I am trying to do: -
Forms![frmData Comparison].txtMatchedSTB_BE = DCount("TestString", strSQL)
where strSQL comes from a select query. The select query SQL code from the query SQL window is
SELECT tblSTB.TestString FROM tblSFF INNER JOIN tblSTB ON tblSFF.TestString = tblSTB.TestString;
In the past I have been trying to enter the query name in the DCount function, but I would like to gently begin doing things with SQL if I can.