Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dcount VS ????

Status
Not open for further replies.

nat1967

Technical User
Joined
Feb 13, 2001
Messages
287
Location
US
Hi group,

I have a form which is used to gives read outs to Managers. The read outs are counts of check boxes that the users check when complete.

The totals are shown in txtboxes. There are a bunch of the 'ol txtboxes!

Currently, I am using Dcount to calculate the numbers for each txtbox. This is very slow since its pulling across a network and Dcount is not the most efficient function.

Here is what I currently use:

***begin*****
tbxTestCasesExec10259 = DCount("[Executed]", "Main", "[Executed] = -1 AND [Feature] = '" & Forms!frm_uatonscreenreport!Feature1 & "'")
tbxPassed10259 = DCount("[Pass]", "Main", "[Pass] = -1 AND [Feature] = '" & Forms!frm_uatonscreenreport!Feature1 & "'")
tbxFail10259 = DCount("[Fail]", "Main", "[Fail] = -1 AND [Feature] = '" & Forms!frm_uatonscreenreport!Feature1 & "'")
tbxDefectOpen10259 = DCount("[Defect]", "Main", "[Feature] = '" & Forms!frm_uatonscreenreport!Feature1 & "'")

****end ****

I have experimented with SQL like this:

"Select Count(Acceptance) As strAccept, Count(Executed) as strExecuted From Main Where [Feature] ='" & Feature1 & "'"

This SQL statement will return the correct numbers but the only way I currently know to put the information into the textbox is to open a recordset with the SQL like this:

Set rs = db.OpenRecordset(strString)
tbxTestCasesPlan10259 = rs!strAccept

This seems like another inefficient way to doing what I need.

Can someone suggest an alternative to Dcount that would speed up my performance? and be more efficient?

any suggestions are welcome and appreciated! Have A Great Day!!!,

Nathan
Senior Test Lead
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top