[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

The Field is too small to accept amount of data

Posted on 2004-10-13
7
Medium Priority
?
285 Views
Last Modified: 2006-11-17
I have an Access97 frontend with an SQL backend. The following code generates the error "The Field is too small to accept amount of data try...." Why? I am not adding or inserting. I am just searching. Why?


Dim db As Database
Dim StrCriteria  As String
Dim CustomersRS As Recordset

        Set db = CurrentDb()
        Set CustomersRS = db.OpenRecordset("Customers", dbOpenDynaset)
        StrCriteria = "[ReminderDate] = #1/1/04#"
        CustomersRS.FindFirst StrCriteria

Thanks, Ira
0
Comment
Question by:QuickQuote
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
7 Comments
 
LVL 9

Expert Comment

by:paelo
ID: 12304788
SQL does use different delimiters for date values but I can never remember how Access handles them, especially Acc97.  Try using "[ReminderDate]='1/1/04'.  You also might want to consider moving to the ADO recordset object rather than DAO when working with SQL server.

-Paul.
0
 

Author Comment

by:QuickQuote
ID: 12304834
Tried that too. Same error. It's just a find. Why the error?
0
 
LVL 9

Expert Comment

by:paelo
ID: 12305065
I'm not familiar with the particular error, but maybe its an old bug with the DAO library.  You could try to check your references and update to the DAO 3.6 library if possible.  
0
 
LVL 3

Accepted Solution

by:
StuartSanders earned 2000 total points
ID: 12307652
You could try using the numerical value

StrCriteria = "[ReminderDate] = " & cstr(clng(datevalue("1/1/04")))

or alternatively open the recordset with the critieria

        Set db = CurrentDb()
        StrCriteria = "[ReminderDate] = #1/1/04#"
        Set CustomersRS = db.OpenRecordset("SELECT Customers.* FROM Customers WHERE " & StrCriteria, dbOpenDynaset)

        if not CustomersRS.eof then
       ' do stuff
             
Stuart
0
 

Author Comment

by:QuickQuote
ID: 12307653
Just tried the new 3.6 library...same error.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question