473,326 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Help on Error 6: Overflow within Access DB

Hi Guys

I have inherited an Access DB in a very poorly state! I have offered to make some changes to it for a local charity but have got stuck on this error it seems to be creating for all new records.

I am working within a Form which is calling another Form matched on the ID, this is within Access 2000. Clicking the cmdLinkExistingCaredFor_Click produces an Error 6: Overflow error.

Can anyone help me as to what maybe making the code fall down?

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdLinkExistingCaredFor_Click()
  2. On Error GoTo Err_cmdLinkExistingCaredFor_Click
  3.  
  4. Set dbs = CurrentDb
  5. Set rst = dbs.OpenRecordset("SELECT * FROM tblPeople " & _
  6. "WHERE tblPeople.PersonType = 'Cared For' OR tblPeople.PersonType = 'Both' ")
  7. If rst.RecordCount > 0 Then
  8.   Me.Tag = Me.CurrentRecord
  9.   stLinkCriteria = "[CarerID]= " & Me.PersonID
  10.   stDocName = "frmExistingCaredForByCarer"
  11.   DoCmd.OpenForm stDocName, , , stLinkCriteria, , , Me.txtForeName & " " & Me.txtFamilyName
  12. Else
  13.   MsgBox "There are NO 'Cared Fors' in the database."
  14. End If
  15.  
  16. Exit_cmdLinkExistingCaredFor_Click:
  17. Exit Sub
  18.  
  19. Err_cmdLinkExistingCaredFor_Click:
  20. Call LogError(Err.Number, Err.Description, Me.Name, "cmdLinkExistingCaredFor_Click")
  21. Resume Exit_cmdLinkExistingCaredFor_Click
  22.  
  23. End Sub
Any help would be much appreciated - was just trying to do someone a favour but got in a little over my head!!!
Oct 21 '07 #1
1 1459
Killer42
8,435 Expert 8TB
I think you need to tell us which line produces the error.

(If it's line 20, I for one would find that quite amusing.)
Oct 22 '07 #2

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

Similar topics

5
by: Jeff | last post by:
Dim lngWeights as long, lngBuckets as Long Const STDWEIGHTS = 12 lngBuckets = 1000 lngWeights = lngBuckets * STDWEIGHTS This causes an Overflow error. For lower values it works. Obviously...
5
by: Jesee | last post by:
I am reading Jeffrey Richter's book "Applied Microsoft .NET Framework programming",i came across "Exception handing". Page 405 says "If the stack overflow occurs within the CLR itself,your...
4
by: Chua Wen Ching | last post by:
Thanks Derek... Okay i had another question.. my program runs smoothly for the first minute, after 1 minute... suddenly it breaks and display this error: do you know what is the cause of...
7
by: Dan | last post by:
Hi. I'm having a problem with searching a databse entry. I'm new to dotnet and still trying to figure some things out. In order to locate a row in an access databse file .mdb, i am using this...
0
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub)...
1
by: innivive | last post by:
I am having a problem with having margins display correctly in IE7, Firefox and Safari. I am not sure if it is the "double margin error" or something else. Any help would be appreciated. The file...
14
by: issentia | last post by:
I'm working on this site: http://www.essenceofsoy.com/redesign/index2.html and I'm having a few problems with getting the layout exactly right. 1) When the menu items are rolled over, they...
10
by: lasmith329 | last post by:
I've never posted a question on any site before, but after racking my head over this hurdle for days, I've caved. I'm working on a program that creates a kml file and exports it to Google Earth. In...
2
by: hcaptech | last post by:
This is my Test.can you help me ? 1.Which of the following statement about C# varialble is incorrect ? A.A variable is a computer memory location identified by a unique name B.A variable's name...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.