Questions tagged [dcount]
49 questions
0
votes
1 answer
VBA error 462 when updating table in Access from Excel
I'm getting the 462 runtime error when updating an Access table from Excel VBA. I think the references are correctly qualified with the object variable as described here and here, but I'm still getting an error on the line where the number of…

MBB70
- 375
- 2
- 16
0
votes
2 answers
Dcount function
I want to count the call number, Datecall, [Username] is the name of fields of table BCKHDY but why numbercall always equal 0. If I delete AND DateCall= #" & DateFrom & "#, code run, that mean there is something wrong with Datecall. What 's…

Luu nguyen
- 157
- 1
- 4
- 17
0
votes
2 answers
DCount() In VBA Always Returning A Null Value
I am attempting to use the DCount() Function to return a count from my table. My issue is that it always returns a NULL value.
How should I Re-write this VBA statement so that it returns the accurate count?
ReturnedCount = DCount("CountOfItems",…

IcyPopTarts
- 494
- 1
- 12
- 25
0
votes
1 answer
Dcount wont count records matching a number entered into a form control
I want to have a form / database that the data goes into automatically search for duplicate entries. Duplicates can either be by reference number (which contains numbers an a letter) or by name.
I have tried this dcount on the control source for…

user97804
- 13
- 5
0
votes
0 answers
DCount not working on Access
I don´t know whats wrong with this query... I want to know how many records are on another query named: Querie_Planilla that have the following characteristics:
The date on the field PeriodoInicial has to be greater or equal to the date…

Lio
- 3
- 3
0
votes
0 answers
Trying to run a "DCOUNT" formula in a cell in vba
I am trying to run a "DCOUNT" formula in a cell in VBA but then my database range (in the formula) refers to a dynamic range on a different sheet. Now the challenge is:
how do I frame my VBA code to refer to the database (which would be dynamic but…

Julius Blue
- 53
- 1
- 6
0
votes
1 answer
DCount function of MSAccess in Visual Studio project not declared
I want to use the DCount function in my Visual Studio Project but DCount gets underlined with a squiggly line and the tooltip says "Not declared" What is the solution?

Chandrasekharan K
- 11
- 2
0
votes
1 answer
Use of DCount in Access to produce group sequential column
I have a calculated column "TimeAfterClass" which uses DateDiff to calculate the number of days between the start of class attendance to an audit date. This works fine. Many of the results have the same number for "TimeAfterClass", and are also…

Pam Leonard
- 59
- 8
0
votes
1 answer
Dcount function --- assistance with criteria
I'm working on building a report and am trying to get the right count of records using the DCOUNT function. I'm in a pickle trying to adjust the CRITERIA part of it, so that it would pull the necessary records. Basically what I'm doing is taking a…

FatBoySlim7
- 232
- 1
- 2
- 13
0
votes
2 answers
DCount for duplicates not allowing user to keep old field if they accidentally edited it
In the BeforeUpdate event on my field, I have a dcount set up to disallow duplicates in the field SurveyID. This works great, except in the event that, in a past record, the user starts editing their SurveyID by accident and tries to cancel…

eee333
- 51
- 1
- 1
- 9
0
votes
3 answers
DCount returning wrong record count when filtering by dates
Trying to get a count of all records from a table called "ComplaintsListMaster" that have a "ComplaintDate" greater than 11/1/2015. The correct value is around 70. But when I use the dcount pasted below, it returns 3951 which is almost every record…

SQLSuperHero
- 538
- 7
- 17
0
votes
1 answer
Dcount in MS Access not filtering correctly
I am doing a dcount in a form through a textbox. I just need it to add the reasons in the table filtered through the reason type and clientid from the open form. The form is open and the dcount counts all records of type letter but does not filter…

DotyDot
- 135
- 2
- 10
0
votes
1 answer
Using DCount in a For Loop with VBA (Microsoft Access)
I'm having a problem with DCount in VBA.
I'm trying to fill an array with values calculated by Dcount. One of the criteria I use in the Dcount I want to get from a different array, this gives the problem:
Dim i As Integer
For i = 0 To…

Douwe
- 13
- 3
0
votes
1 answer
Problems of wording in a Dcount function
on click(), I am having problem or wording in the following:
Private Sub Cmd_Create_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim rs_conterparty As DAO.Recordset
Dim rsCount As Integer
Dim PE_nb As Integer
Dim BizNO As Field
Dim…

CHARUEL Damien
- 1
- 2
0
votes
2 answers
DCount function wording of the CRITERIA
I have problems with the wording of the criteria of a DCount function.
On click() I would like to have the number of occurrences of the field "YearMonth" in a tale in accordance with the value entered in an inbound fields called "Txt_entry".
My…

CHARUEL Damien
- 1
- 2