473,803 Members | 3,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Run Time error : 3464 ( Data Type Missmatch in criteria expression)

1 New Member
Dears,
I have a table named Tasks that Contains all the Information about my employee , i am making a Form to open a report based on Employee Name, Tasks done, Date.
but i'm getting error with this code
can u help me figure out where is my error plz

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command20_Click()
  2. Dim sFilter As String
  3. sFilter = ""
  4.  
  5. If Me.Name.ListIndex <> -1 Then
  6.     If sFilter = "" Then
  7.         sFilter = "[Assigned To]= " & Me.Name & ""
  8.         Else
  9.         sFilter = sFilter & " And [Assigned To]=" & Me.Name & ""
  10.     End If
  11. End If
  12.  
  13. If Me.Task.ListIndex <> -1 Then
  14.     If sFilter = "" Then
  15.         sFilter = "[Title]= '" & Me.Task & "'"
  16.         Else
  17.         sFilter = sFilter & " And [Title]='" & Me.Task & "'"
  18.     End If
  19. End If
  20.  
  21.  If Format(Me.Dates, "MM/DD/YYYY") <> -1 Then
  22.     If sFilter = "" Then
  23.         sFilter = "[Date]= '" & Format(Me.Dates, "MM/DD/YYYY") & "'"
  24.         Else
  25.         sFilter = sFilter & " And [Date]='" & Format(Me.Dates, "MM/DD/YYYY") & "'"
  26.     End If
  27. End If
  28.  
  29. DoCmd.OpenReport "Agent Total Hour", acViewPreview, , sFilter
  30.  
  31. End Sub

NB: if i need to set a range so i can choose between 2 dates what would i do plz

Thanks in advance.
Elie Nakhle.
Sep 29 '08 #1
1 2541
Stewart Ross
2,545 Recognized Expert Moderator Specialist
Hi. Rather than have us guess what your error is and where it is occurring, please tell us the line number (referred to the code-tagged line numbers now shown in post 1 above) and the exact nature of the error that occurs.

I would also ask you not to use phone-text abbreviations in your posts, as many readers will not be able to work out what these mean.

Thank you.

-Stewart
Sep 29 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
10823
by: Chicken Kebab Abdullah | last post by:
Does anyone know why I get the error 3464 Data type mismatch from the following code. I have a form with a combo(to choose a consumable) and 2 list boxes on it. list on left is all printers and list on right shows the ones currently compatible with the consumable chosen in the combo at the top.
1
6548
by: ArcadeJr | last post by:
Good morning all! I have been getting a Run-time Error message #3464 - Data Type mismatch in criteria expression. While trying to run a query. I have a database where the field Asset_Number was once a type Number, but I had to change it to a type Text due to I needed to have two zeros at the beginning of the Asset Number (EX: 001234.) The rease I am writing is that now when I run from My Query Menu a
2
2591
by: technocraze | last post by:
Hi guys, Implementations application & programming environ MS Acess + Visual Basic Table fields Serialno (pk) - Auto number StudentId - text Course - text intake - number
10
6238
by: aaronrm | last post by:
I have a real simple cross-tab query that I am trying to sum on as the action but I am getting the "data type mismatch criteria expression" error. About three queries up the food chain from this cross-tab query I am using a simple query with no grouping where I am filtering some data out in the criteria line. I have been out of access for a couple years but I remember in the past I had a solution for this but I can't remember. Any help...
1
2718
by: DC | last post by:
Any idea why this code would cause a error? The SQL that gets executed seems to be (using record 1132 as an example) DELETE FROM user_table WHERE ID = '1132'; And the value of ViewState("ID") =1132 ID is an Access database autonumber field. Is Viewstate data passed as an odd type or something?
0
3469
by: bluepiper | last post by:
Hi everyone. I have created a linked server on SQL Server 2005 to access data from visual foxpro database. I execute a query Select * from OpenQuery(members, 'Select * from memfile') but Im getting an error message: error converting data type DBTYPE_DBTIMESTAMP to datetime. Why does this error occurs? Is it about getting null value from date type?? How can i retrieve the data from the query? Can anyone please help me or give me an example...
2
9850
by: CCHDGeek | last post by:
I created a database with a separate front-end that is installed on each computer and linked to a back-end server. After installing the file on several computers, I realized I was getting this error: Run-time error '3085': Undefined function 'Date' in Expression. I did some research and found out that it's an issue with my references. So, I was able to fix it. But my concern is if I make changes to the front-end and need to update everyone's...
2
3959
by: tmoon3 | last post by:
Hello, This must be a simple mistake, but for some reason I cannot seem to get around it. I am simply trying to create a report of all employees that have a date filled in in a training column in an access DB. I give the users a drop down list to choose employee type, division, and term status and based on their choices I create the selection criteria for the report. This code works without the ForkTruckClass > '#1-01-1900#' (the below...
5
5348
AAPWM
by: AAPWM | last post by:
Hello My job is to extract data from my companies database with Crystal Reports, export that data to Excel, modify the data, save the data as "Text "tab delimited"", and upload to the database once again. Ive done this for close to a year and have never had this error message. "Error converting data type varchar to numeric" 2255;2801 IMPORT LOG;IMPORT MAPPING INTERFACE;IMPORT MAPPINGS;SQL - CALL IMPORT ROUTINES;_DB ERROR Can...
0
9703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10548
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7604
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.