Questions tagged [dcount]

49 questions
0
votes
1 answer

Run-time error '3075': Syntax error (missing operator) in query expression 'CustomerID='

When there is data with the same CustomerID, the button is bold, otherwise it is not. This is my error when we click to add a new Customer. Run-time error ‘3075’: Syntax error (missing operator) in query expression ‘CustomerID=’ Private Sub…
0
votes
1 answer

Access Dcount function with 4 criteria

I appreciate some help I am trying to use Dcount function with 4 criteria I have a text box in a form to count records on table_orders The DCount function has 4 criteria: The ID field in table_orders has to match the Form ID field The field nature…
Emanuel
  • 41
  • 1
  • 6
0
votes
0 answers

Using Dcount in access vba shows run-time error 3075

I am working on an access database and I want to get a value by a query in witch I used Dcount statement but it shows run-time error 3075. The following is my query, can anybody help and tells me what's wrong with my query? strTotalNumber = "Select…
0
votes
1 answer

How do i resolve this MS Access Dcount error?

Getting the following error.... rs!StoreID is an integer in the Stores table and prints out just fine in the msgbox function What am I doing wrong? I've used Dcount…
MikeWojcik
  • 15
  • 4
0
votes
1 answer

Using Dcount with Access VBA produces error message

I'm trying to create a number of reports in Access 2016. One report is a simple message box that will display the number of records in a specific table ("tbl_Data") WHERE the "Total_Sum" field is greater than $ 200. The "Total_Sum" field data type…
Shaves
  • 884
  • 5
  • 16
  • 46
0
votes
1 answer

Can I use DCount to populate a textbox with criteria from a different table?

I have been having much trouble with this problem. I have a table in Access called "Import" that I import records to. Each record has a facility name that corresponds to a "region" from a different table called "COID_Lookup". I'm trying to get a…
0
votes
0 answers

DCount function in access showing duplicates for blank fields

I am using DCount function in my user access form to prevent duplicates of reference number keyed by multiple users simultaneously. however, it is prompting "Ref already exists" even though the field is blank. any idea why? If DCount("[UNIQUE_REF]",…
0
votes
1 answer

How to count specific value in a table in Access query

I'm using Dcount on a query column to get how many 1 from another table. I have given the current query column value in the parameter of Dcount as below. DCount("AttnStatus","InstructorAttendance","AttnStatus=1 And AttnDate>=#" & [FD] & "# And…
Abzal Ali
  • 153
  • 1
  • 12
0
votes
0 answers

Can I add text after the Dcount formula in unbound text field of Ms Access Form?

I want to add a text after Dcount formula in Ms Access Form. I use the unbound text field to use the DCount formula however I would like to add 'text' within the same field after Dcount formula finishes. Please advise how do I do that?
0
votes
1 answer

undefined function dcount in expression

I am using Access 2016. I am using dcount in my query however I am getting this error "undefined function dcount in expression". Any idea how can I fix this issue? here is my syntax SELECT Table1.Supplier, Table1.Spec,…
0
votes
0 answers

Access VBA If check box = true open query but give message if empty

I've seen a number of post about not opening a query if the query is blank but not sure where to have the code to check the output of the query. Before the query is run i have a number of conditions, if they are met then the query is opened. When i…
hIlary
  • 85
  • 1
  • 9
0
votes
1 answer

How to check if value exist in two tables

Hi I've searched the net and couldn't find the right answer to my question. I have two tables GCSALLDATA and GCS-RECONCILED. They both have the same columns but I only need to focus on two [Control Number] (Short Text) and [NotInDevTrack] (yes/no) I…
mightymax
  • 431
  • 1
  • 5
  • 16
0
votes
2 answers

Nested Dlookup VBA

I'm trying to display the Vendor Name and a message that a selected PO Number (from a combo box on the form) does not require QA in a message box. The DLookup to get the vendor number from the PO Number works, but I can't seem to nest it to get the…
Newbie
  • 55
  • 5
0
votes
2 answers

How to check if data exist in Access table

I have created a userform that insert data into an Access table. while inserting data, I want to make sure that the ID inserted must exist in the Access table. I have used the DCOUNT function to do this but this is rendering a 'Type Mismatch' error.…
0
votes
2 answers

Access VBA Run-time error 3078, or Type Mismatch on DCount function

Objective: I'm building VBA code to filter through an address table SunstarAccountsInWebir_SarahTest. I want to loop through first and see if the address is "valid". If it is not valid – export to different table. If it is valid – it enters…
rgorowsky
  • 105
  • 1
  • 12