error 3078:

R

Rajeev

Hi everybody,
I developed an application with access and when I tried to deploy the
application with the access runtime it gives me the following error:3078

"The Microsoft Access database engine cannot find the input table or query
'tblLWIS'. Make sure it exists and that its name is spelled correctly. "

It is working fine in full version of access but not in the runtime version

Please go through the code:

Private Sub Begin_Click()
On Error GoTo Err_Begin_Click
Dim db As Database, tb As TableDefs

' Compute Current State Scores for individuals and groups
DoCmd.OpenQuery "qryTSBCSWR_dates"
DoCmd.OpenQuery "qryTSBCSWR"
DoCmd.OpenQuery "qryTSBCSWR_10ormore"
DoCmd.OpenQuery "qryTSBCSWR_9orless"
DoCmd.OpenQuery "qryTSBCSWR_client_Means"
DoCmd.OpenQuery "qryTSBCSWR_client_SDs"
DoCmd.OpenQuery "qryTSBCSWR_staff_Means"
DoCmd.OpenQuery "qryTSBCSWR_staff_SDs"
'Delete or Change names of tables so MakeTable queries can be used to
compute last week scores
Set db = CurrentDb
Set tb = db.TableDefs
tb.Delete ("tblTSBC_SWRraw")
tb.Delete ("tblTSBCSWR_forMSD")
DoCmd.Rename "tblCSIS", acTable, "tblTSBCSWR"
DoCmd.Rename "tblCSGroup", acTable, "tblTSBCSWR_Groupscores"
db.Close
' Compute Last Week Scores for individuals and groups; these do the same as
described for current state scores above
DoCmd.OpenQuery "qryTSBCSWR_LWraw"
DoCmd.OpenQuery "qryTSBCSWR"
DoCmd.OpenQuery "qryTSBCSWR_10ormore"
DoCmd.OpenQuery "qryTSBCSWR_9orless"
DoCmd.OpenQuery "qryTSBCSWR_client_Means"
DoCmd.OpenQuery "qryTSBCSWR_client_SDs"
DoCmd.OpenQuery "qryTSBCSWR_staff_Means"
DoCmd.OpenQuery "qryTSBCSWR_staff_SDs"
'Delete or Change names of tables
Set db = CurrentDb
Set tb = db.TableDefs
tb.Delete ("tblTSBC_SWRraw")
tb.Delete ("tblTSBCSWR_forMSD")
DoCmd.Rename "tblLWIS", acTable, "tblTSBCSWR"
DoCmd.Rename "tblLWGroup", acTable, "tblTSBCSWR_Groupscores"
db.Close
' Compute change from last week scores & put into tables
DoCmd.OpenQuery "qryTSBCSWR_LWChange_Individual"
DoCmd.OpenQuery "qryTSBCSWR_LWChange_Group"
' Compute means and sds for entry week
DoCmd.OpenQuery "qryTSBCSWR_EW_clientMeans"
DoCmd.OpenQuery "qryTSBCSWR_EW_clientSDs"
DoCmd.OpenQuery "qryTSBCSWR_EW_staffMeans"
DoCmd.OpenQuery "qryTSBCSWR_EW_staffSDs"
' Compute change from entry week scores & put into tables
DoCmd.OpenQuery "qryTSBCSWR_EWChange_Individual"
DoCmd.OpenQuery "qryTSBCSWR_EWChange_Group"
' Put new entry week records in permanent table tblEntryWeek
DoCmd.OpenQuery "qryTSBCSWR_NewEW_client"
DoCmd.OpenQuery "qryTSBCSWR_NewEW_staff"
'GoTo Skip1
' Delete temporary files
Set db = CurrentDb
Set tb = db.TableDefs
tb.Delete ("tblLWIS")
tb.Delete ("tblLWGroup")
tb.Delete ("tblEWGroup")
db.Close
Skip1:
' Show message box indicating summary process complete and instructing on
printing
' and viewing on screen
If MsgBox("The TSBC Standard Weekly Reports are ready.", _
vbOKOnly, "Finished") Then
DoCmd.Close acForm, "frmTSBCSWR_request"
End If

Exit_Begin_Click:
Exit Sub

Err_Begin_Click:
Dim intErrForm As Integer
Call TSBCErrorHandler(Err.Number, intErrForm, Err.Description)
Resume Exit_Begin_Click

End Sub
 
S

Stuart McCall

Rajeev said:
Hi everybody,
I developed an application with access and when I tried to deploy the
application with the access runtime it gives me the following error:3078

"The Microsoft Access database engine cannot find the input table or query
'tblLWIS'. Make sure it exists and that its name is spelled correctly. "

It is working fine in full version of access but not in the runtime
version

Please go through the code:

Private Sub Begin_Click()
On Error GoTo Err_Begin_Click
Dim db As Database, tb As TableDefs

' Compute Current State Scores for individuals and groups
DoCmd.OpenQuery "qryTSBCSWR_dates"
DoCmd.OpenQuery "qryTSBCSWR"
DoCmd.OpenQuery "qryTSBCSWR_10ormore"
DoCmd.OpenQuery "qryTSBCSWR_9orless"
DoCmd.OpenQuery "qryTSBCSWR_client_Means"
DoCmd.OpenQuery "qryTSBCSWR_client_SDs"
DoCmd.OpenQuery "qryTSBCSWR_staff_Means"
DoCmd.OpenQuery "qryTSBCSWR_staff_SDs"
'Delete or Change names of tables so MakeTable queries can be used to
compute last week scores
Set db = CurrentDb
Set tb = db.TableDefs
tb.Delete ("tblTSBC_SWRraw")
tb.Delete ("tblTSBCSWR_forMSD")
DoCmd.Rename "tblCSIS", acTable, "tblTSBCSWR"
DoCmd.Rename "tblCSGroup", acTable, "tblTSBCSWR_Groupscores"
db.Close
' Compute Last Week Scores for individuals and groups; these do the same
as
described for current state scores above
DoCmd.OpenQuery "qryTSBCSWR_LWraw"
DoCmd.OpenQuery "qryTSBCSWR"
DoCmd.OpenQuery "qryTSBCSWR_10ormore"
DoCmd.OpenQuery "qryTSBCSWR_9orless"
DoCmd.OpenQuery "qryTSBCSWR_client_Means"
DoCmd.OpenQuery "qryTSBCSWR_client_SDs"
DoCmd.OpenQuery "qryTSBCSWR_staff_Means"
DoCmd.OpenQuery "qryTSBCSWR_staff_SDs"
'Delete or Change names of tables
Set db = CurrentDb
Set tb = db.TableDefs
tb.Delete ("tblTSBC_SWRraw")
tb.Delete ("tblTSBCSWR_forMSD")
DoCmd.Rename "tblLWIS", acTable, "tblTSBCSWR"
DoCmd.Rename "tblLWGroup", acTable, "tblTSBCSWR_Groupscores"
db.Close
' Compute change from last week scores & put into tables
DoCmd.OpenQuery "qryTSBCSWR_LWChange_Individual"
DoCmd.OpenQuery "qryTSBCSWR_LWChange_Group"
' Compute means and sds for entry week
DoCmd.OpenQuery "qryTSBCSWR_EW_clientMeans"
DoCmd.OpenQuery "qryTSBCSWR_EW_clientSDs"
DoCmd.OpenQuery "qryTSBCSWR_EW_staffMeans"
DoCmd.OpenQuery "qryTSBCSWR_EW_staffSDs"
' Compute change from entry week scores & put into tables
DoCmd.OpenQuery "qryTSBCSWR_EWChange_Individual"
DoCmd.OpenQuery "qryTSBCSWR_EWChange_Group"
' Put new entry week records in permanent table tblEntryWeek
DoCmd.OpenQuery "qryTSBCSWR_NewEW_client"
DoCmd.OpenQuery "qryTSBCSWR_NewEW_staff"
'GoTo Skip1
' Delete temporary files
Set db = CurrentDb
Set tb = db.TableDefs
tb.Delete ("tblLWIS")
tb.Delete ("tblLWGroup")
tb.Delete ("tblEWGroup")
db.Close
Skip1:
' Show message box indicating summary process complete and instructing on
printing
' and viewing on screen
If MsgBox("The TSBC Standard Weekly Reports are ready.", _
vbOKOnly, "Finished") Then
DoCmd.Close acForm, "frmTSBCSWR_request"
End If

Exit_Begin_Click:
Exit Sub

Err_Begin_Click:
Dim intErrForm As Integer
Call TSBCErrorHandler(Err.Number, intErrForm, Err.Description)
Resume Exit_Begin_Click

End Sub

Try removing the parens from these lines:
tb.Delete ("tblLWIS")
tb.Delete ("tblLWGroup")
tb.Delete ("tblEWGroup")

Not sure if that's the problem, but the parens certainly aren't required.
 
R

Rajeev

I removed it but it didn't help
When I commented the the statements I received no error but that wont help
me..
tb.Delete ("tblLWIS")
tb.Delete ("tblLWGroup")
tb.Delete ("tblEWGroup")
So, I guess the proble is with the above code
Can anybody help me with this,Also I bet the tables are there before the
delete code executes
 
S

Stuart McCall

Rajeev said:
I removed it but it didn't help
When I commented the the statements I received no error but that wont help
me..
tb.Delete ("tblLWIS")
tb.Delete ("tblLWGroup")
tb.Delete ("tblEWGroup")
So, I guess the proble is with the above code
Can anybody help me with this,Also I bet the tables are there before the
delete code executes

I think you misunderstood me. What I meant was for you to make the lines
read like this:

tb.Delete "tblLWIS"
tb.Delete "tblLWGroup"
tb.Delete "tblEWGroup"
 
S

Stuart McCall

Rajeev said:
I made those changes but I still receive the same error message

Try placing a breakpoint on the line:

tb.Delete "tblLWIS"

Go and get this function:

http://www.smccall.demon.co.uk/Tables.htm#IsTable

and paste it into a standard module (not a class module or a form or report
module).

Then run the app till you hit the breakpoint, switch to the VBE and type the
following into the debug window:

?IsTable("tblLWIS")

If you get 'True' then I'm afraid I don't know what's wrong. If 'False' then
you need to investigate why the table doesn't exist.

OR

you could use code like the following:

If IsTable("tblLWIS") Then tb.Delete "tblLWIS"

but if it were me I'd want to know why things aren't as I'd expect...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top