Help on Error 6: Overflow within Access DB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AngieMP
    New Member
    • Oct 2007
    • 2

    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 cmdLinkExisting CaredFor_Click produces an Error 6: Overflow error.

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

    [CODE=vb]Private Sub cmdLinkExisting CaredFor_Click( )
    On Error GoTo Err_cmdLinkExis tingCaredFor_Cl ick

    Set dbs = CurrentDb
    Set rst = dbs.OpenRecords et("SELECT * FROM tblPeople " & _
    "WHERE tblPeople.Perso nType = 'Cared For' OR tblPeople.Perso nType = 'Both' ")
    If rst.RecordCount > 0 Then
    Me.Tag = Me.CurrentRecor d
    stLinkCriteria = "[CarerID]= " & Me.PersonID
    stDocName = "frmExistingCar edForByCarer"
    DoCmd.OpenForm stDocName, , , stLinkCriteria, , , Me.txtForeName & " " & Me.txtFamilyNam e
    Else
    MsgBox "There are NO 'Cared Fors' in the database."
    End If

    Exit_cmdLinkExi stingCaredFor_C lick:
    Exit Sub

    Err_cmdLinkExis tingCaredFor_Cl ick:
    Call LogError(Err.Nu mber, Err.Description , Me.Name, "cmdLinkExistin gCaredFor_Click ")
    Resume Exit_cmdLinkExi stingCaredFor_C lick

    End Sub[/CODE]

    Any help would be much appreciated - was just trying to do someone a favour but got in a little over my head!!!
    Last edited by Killer42; Oct 22 '07, 03:17 AM.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    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.)
    Last edited by Killer42; Oct 22 '07, 03:18 AM.

    Comment

    Working...