Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

faster way

50 views
Skip to first unread message

bobh

unread,
Sep 16, 2014, 4:34:45 PM9/16/14
to
Hi All,

isn't there a faster, easyier way than this

Dim MyDB As DAO.Database, MyRec As DAO.Recordset
Dim strSQL As String
Set MyDB = CurrentDb()

strSQL = "SELECT Count(*) AS Expr1 FROM tblIdeas"
Set MyRec = MyDB.OpenRecordset(strSQL, dbOpenSnapshot)
Me.bxTotal = MyRec!Expr1
MyRec.Close

bobh.

Ulrich Möller

unread,
Sep 16, 2014, 5:49:24 PM9/16/14
to
Shorter

me.bxTotal = dcount("*","tblIdeas")

but faster ?

Ulrich

Albert D. Kallal

unread,
Sep 17, 2014, 7:24:24 PM9/17/14
to
"Ulrich Mᅵller" wrote in message news:lvab94$eo5$1...@dont-email.me...

>me.bxTotal = dcount("*","tblIdeas")
>
>but faster ?
>
>Ulrich

There should not be any differnce in perofmrance - so your example stands
just fine (using a recordset will NOT perform faster).

Regards,

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
PleaseNoS...@msn.com

bobh

unread,
Sep 18, 2014, 9:03:52 AM9/18/14
to
I used this and it works just fine, much less coding :)
thanks!
bobh.


0 new messages