Home

PLEASE HELP! Tables and querys wont export/load and receive error when opening DB

troy miller
Occasional Visitor

I ended up supporting a 2005 Access database then converted to 2016. I noticed the tables and querys did not export. I set the new references and still get the following error.

 

attached (input) is the error I receive when opening the database. No table or query are on the database. does the code create them from SQL? do I need to point the DB to SQL.

Public SQLcon As ADODB.Connection = user define type not defined.

My questions:

1. Im running though VPN client - does the Access database on my DT need to point to the SQL database on the server or, does the VBA code handle that.

2. Will the tables and querys load once the code runs? I receive errors when compiling and try to open 

Here is the code when trying to open:

Option Compare Database
Option Explicit

Public dbDMI As Database
Public wspDMI As Workspace
Public SQLcon As ADODB.Connection - this is where it errors out
Public gstrLastPO As String
Public gstrLastSC As String
Public gstrLastINV As String
Public gintLastCBF As Integer
Public gstrLastPayment As String
Public gstrLastReceipt As String
Public gstrDocNoSelected As String


When compiling. It errors out here as well:

Public Function LoadCBFrst(prst As ADODB.Recordset) As Boolean - errors here as well
On Error GoTo HandleErrors:
 mstrDocStatus = "OLD"
 With prst
    mintCBFno = !CBFno
    mlngIDbroker = !IDbroker
    mstrInvoiceNo = !InvoiceNo & ""
    If Not IsNull(!InvoiceDate.Value) Then mdtmInvoiceDate = !InvoiceDate.Value
    mcurInvoiceAmount = !InvoiceAmount
    mcurGSPamount = !GSPamount
    If Not IsNull(!DatePaid.Value) Then mdtmDatePaid = !DatePaid.Value
    mbytCBFstatus = !CBFstatus
    mstrPortEntryNo = !PortEntryNo & ""
    mfCommentYN = !CommentYN
    If Not IsNull(!DateStarted.Value) Then mdtmDateStarted = !DateStarted.Value
    If Not IsNull(!DMIcheckNo.Value) Then mlngDMIcheckNo = !DMIcheckNo.Value
    If Not IsNull(!TermsQB) Then
        mintTermsQB = !TermsQB
    Else
        mintTermsQB = 0
    End If

Any help you can provide to help me with this is greatly appreciated. Even if you can answer part of it I can move forward from there.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies