Share via

Using Access 97 a database is not creating a table when it should how to I fix this?

Anonymous
2020-07-28T09:59:56+00:00

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

Usually we just manually recreate the table and it works but for some reason this isn't working any more.

Private Sub cmdRefresh_Click()

Call RefreshData

Function RefreshData()

Dim tmpRec, tmpRec1

tmpRec = Form_frmStatus.RecordSource

Form_frmStatus.lstSearch.RowSource = ""

Form_frmStatus.RecordSource = ""

tmpRec1 = Form_frmPartsUsed.RecordSource

Form_frmPartsUsed.RecordSource = ""

DoCmd.Close acForm, "frmStatus"

DoCmd.SetWarnings False

'Me.RecordSource = ""

'Me.lstSearch.RowSource = ""

DoCmd.OpenQuery "qrymakePArtsUSed"

DoCmd.OpenQuery "qryMakeSummary"

DoCmd.SetWarnings True

DoCmd.OpenForm "frmStatus"

Form_frmStatus.RecordSource = tmpRec

Form_frmPartsUsed.RecordSource = tmpRec1

'Me.RecordSource = tmpRec

Form_frmStatus.lstSearch.RowSource = "qrysearchall"

'Me.lstSearch.Requery

'Me.Requery

'Me.Detail.Visible = True

End Function

If anyone can help it is greatly appreciated.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Anonymous
    2020-07-30T17:21:07+00:00

    PS:  Your link isn't publicly shared, so we can't use it anyways.

    Was this answer helpful?

    0 comments No comments
  2. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2020-07-30T14:23:21+00:00

    Re-read my post. I did not ask you to post your database, but rather for you to debug the issue.

    Then maybe post the results here.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2020-07-30T13:47:45+00:00

    Was this answer helpful?

    0 comments No comments
  4. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2020-07-28T13:46:07+00:00

    You appear to be running two MakeTable queries:

    DoCmd.SetWarnings False

    DoCmd.OpenQuery "qrymakePArtsUSed"

    DoCmd.OpenQuery "qryMakeSummary"

    As Daniel said, this is highly irregular but let's ignore that for a minute. Also note the use of SetWarnings which essentially says "do not show me any errors that may occur; just keep going".

    You need to comment that line out. Then set a breakpoint on the next line and carefully step over the two MakeTable lines. 99% chance the error message is going to tell you something interesting.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2020-07-28T12:09:52+00:00

    Without seeing the details of each query it is virtually impossible for us to help you.  It's it possible to be given a link to download a copy for closer look (with some instructions as to what exactly isn't working)?

    That said, a '97 database is more than deprecated!  The fact that you need to recreate a table over and over indicates either a major issue with the database itself, or a fundamental design flaw.  You truly should be upgrading to an accdb file format (which is 14-15 years old already).

    When was the last time the database was compacted and repaired?

    Do you have functional backups you could revert to?

    Was this answer helpful?

    0 comments No comments