Results 1 to 2 of 2

Thread: Error 3078 : The Microsoft Jet database engine cannot find the input table or ...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Posts
    66

    Post

    I wrote a program with Visual Basic 6.0 which creates an ACCESS database.
    I have also added a menu which allows me to access DataReports.

    Sometimes, when the DataReport is called, I get the following error message:

    The Microsoft Jet database engine cannot find the input table or query <name>. Make sure it exists and that its name is spelled correctly.

    This error does not appeared systematically but when it happens, if I close the empty DataReport window and call again the menu, it works fine !...

    If I run the program step by step in debug mode, everything is OK !...


    Private Sub mnuRptHab_Click()
    select_Hab
    End Sub
    '
    ' Delete and create QueryDef for DataReport
    '
    Public Sub select_Hab()

    Dim Qd As QueryDef
    On Error GoTo CheckErr
    Db.QueryDefs.Delete ("rpt_hab")

    SQL = "select * from VADM_HAB where (VADM_ID = " & AdmId & ") order by VADM_HABILITATION"
    Set Qd = Db.CreateQueryDef("rpt_hab", SQL)
    ' relance le select SQL
    VisiAdm.rsHabilitations.Requery
    '
    Qd.Execute
    If Qd.OpenRecordset.RecordCount > 0 Then
    rptHab.Show ' affiche le report
    Else
    MsgBox RRS(resNoRecord), vbExclamation
    End If
    Exit Sub

    CheckErr:
    Select Case Err
    Case 429
    MsgBox RRS(resError) & Err & " : " & Error(Err), vbCritical, "select_Hab..."
    Case Else
    Resume Next
    End Select

    End Sub

    Private Sub DataReport_Initialize()
    Me.Caption = RRS(lblHabList)
    Sections(2).Controls(1).Caption = RRS(lblHabList)
    Dim dico As String
    dico = MainMDI.stBar.Panels("ficname").Text
    i = InStrRev(dico, "\")
    dico = IIf(i > 0, Mid(dico, i + 1, Len(dico) - i), dico)
    Sections(2).Controls(3).Caption = dico ' dictionnaire

    Sections(3).Controls(5).Caption = RRS(resHabName)
    Sections(3).Controls(6).Caption = RRS(resPrimary)
    Sections(3).Controls(7).Caption = RRS(resJointure)
    Sections(3).Controls(8).Caption = RRS(resDescHab)
    End Sub

  2. #2
    Lively Member
    Join Date
    Jun 1999
    Posts
    120

    Post

    I think when DataReport is called,
    VB haven't finish the processing
    of the query (rpt_hab?) although
    your program has called it before
    calling DataReport. A similar thing
    happens when calling Shell command
    that creates a file to be used in
    succeeding program lines. One just
    has to make sure that the program
    had finished processing the query
    before calling DataReport...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width