UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Error 3270 Running Module, Access 2013    
 
   
djs42
post Jan 10 2017, 07:21 PM
Post#1



Posts: 35
Joined: 11-October 16



I have a module which I am using to grab a snapshot of an SQL database.
This worked flawlessly until a week ago and I now am getting Error 3270 and failure to return from the module to the calling VBA.
When I look at the resulting tables the data is all correct and all of the tables are present.

Any ideas what to look for?

Also, is there any way of viewing / editing the Saved Import in Access?

QUOTE
Option Compare Database
Option Explicit

Public Function NC_UpdateBE()

' Drop existing NC tables
Dim t As TableDef
For Each t In CurrentDb.TableDefs
If t.Name Like "dbo_*" Then DoCmd.RunSQL ("DROP Table " & t.Name)
Next

' Copy new tables from NC
DoCmd.RunSavedImportExport "NC-Snapshot"

End Function
Go to the top of the page
 
ranman256
post Jan 13 2017, 11:29 AM
Post#2



Posts: 786
Joined: 25-April 14



you could have showed us the line where it failed , BUT,
I think its here:

If t.Name Like "dbo_*" Then DoCmd.RunSQL ("DROP Table " & t.Name)

the LIKE is for SQL, try:
if instr( t.Name , "dbo_" )>0

If this does NOT solve it ,I have another idea, but I need to know the line that fails.
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    13th December 2017 - 04:19 AM