Rob.Mills
08-07-2003, 10:52 AM
Is it possible to perform D expressions on recordsets in memory or something equivalent to that?
|
View Full Version : Expressions in recordsets Rob.Mills 08-07-2003, 10:52 AM Is it possible to perform D expressions on recordsets in memory or something equivalent to that? dcx693 08-07-2003, 11:47 AM Actually, I've never tried it and based on the Access help file, it implies that the domain must be the name of a table or query. I've never tried because there is a better faster alternative. Since you have a recordset in memory, you can select some records from that recordset using a SQL statement, then get a count of the records returned in the new recordset. TiggerNYC 08-07-2003, 11:52 AM Don't know if this will help, but I had a similar situation...I had to generate a query, but I also needed to see the number of unique user ids in that query in order to know which report to run... Dim rptcount As Long DoCmd.OpenForm "frmrpt2" DoCmd.OpenQuery "qryrpt2" rptcount = DCount("user_id", "qryrpt2") I used the rptcount in a If...then...else dcx693 08-07-2003, 12:28 PM TiggerNYC, your technique will work in the case of a stored query (even though it might be taking parameters from an open form). I got the sense the user was talking about a DAO or ADO recordset. Also, your rptcount will only be accurate if the "user_id" field does not contain any Nulls. |