Error - template LAYOUT-DATA-WRAPPER not found

A configuration error was detected in the CGI script; the LAYOUT-DATA-WRAPPER template could not be found.

Error - template STYLE-SHEET not found

A configuration error was detected in the CGI script; the STYLE-SHEET template could not be found.

Error - template SUB-TOP-BANNER not found

A configuration error was detected in the CGI script; the SUB-TOP-BANNER template could not be found.
Subject:
From:
Sidney Stone <[log in to unmask]>
Reply To:
PCSOFT - Personal Computer software discussion list <[log in to unmask]>
Date:
Thu, 5 Jul 2001 16:22:42 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (110 lines)
I am using Access 97 with a MB Foster ODBC connection to Amisys.  Each
one
of our computers is loaded with ODBC and because it is on the hard
drive,
each load has a unique password identifying the computer owner.  If I
create an Access database utilizing the ODBC it registers that I am whom
I
am by checking my log on and password.  When I send the database out for
the users, when they attempt to run queries or print reports, they
receive
an error stating that the ODBC connection failed and prompts the user
with the Log On Screen for MB Foster ODBC connection asking for the user
to log on with user id and password.    We have written some code around
this that refreshes the link to the Amisys tables via ODBC upon opening of
the database, however, this code does not work for the reports.
Function RelinkOne()
    On Error GoTo Errmsg:
    'Relinks one of the Amisys Attached tables
    'which will make Access recognize the current machine's user
    Dim db As Database, tdf As TableDef
    Dim rst As Recordset
    Dim mytype As Integer
    Dim myname As String
    Dim mynewname As String
    Dim foreignname As String
    Dim sql As String
    Dim mymess As String
    'Dim sngStart As Single
    'Dim sngEnd As Single
    'Dim seconds As Single

    'sngStart = Timer

    Set db = CurrentDb
    Set rst = db.OpenRecordset("msysObjects")

    'Loop through System Objects table until finding the first attached
table
    DoCmd.Hourglass True
    rst.MoveFirst
    Do Until rst.EOF
        mytype = rst![Type]
        If mytype = 4 Then 'Relink just one table then end program
            myname = rst![Name]
            mynewname = myname & "a"
            foreignname = rst![foreignname]
            Set tdf = db.TableDefs(myname)
            tdf.Name = mynewname
            Set tdf = db.CreateTableDef(myname)
            tdf.Connect = "ODBC;DSN=AMISYS-LIVE;DATABASE=;;"
            tdf.SourceTableName = foreignname
            db.TableDefs.Append tdf
            sql = "Drop table " & mynewname & ";"
            db.Execute sql
            DoCmd.Hourglass False
            'sngEnd = Timer
            'seconds = sngEnd - sngStart
            'MsgBox "This program took " & seconds & " seconds"
            Exit Function
        End If
        rst.MoveNext
    Loop

    DoCmd.Hourglass False
    Set db = Nothing

Errmsg:
    Set tdf = db.TableDefs(mynewname)
    tdf.Name = myname
    mymess = "Error code " & Err & "." & Chr(10) & Chr(13) & Chr(10) &
Chr(13)
    mymess = mymess & "There has been an error in relinking the attached
Amisys tables.  "
    mymess = mymess & "Please call the IM department for assistance."
    MsgBox mymess, vbOKOnly, "Important!"
    DoCmd.Hourglass False
    Exit Function

End Function

The above works for running queries but again, not for print preview or
printing of reports.  Any ideas?
TIA
Sidney Stone
App Systems Analyst


Sidney Stone
Application Systems Analyst
Information Management Dept
Carilion Health Plans, Inc.
540-857-5340
Fax:  540-857-5342
[log in to unmask]

CONFIDENTIALITY NOTICE:  This e-mail communication and any attachments
hereto contains confidential information which may be privileged and is
intended for the use of the designated recipients named above or their
authorized employees or agents.  If you are not the intended recipient,
you are hereby notified that you have received this communication in error
and that any review, disclosure, dissemination, distribution or copying of
it or its contents is strictly prohibited.  If you have received this
communication in error, please call us at the number above and destroy all
copies of this communication (electronic/written form) and any attachments
hereto.  Thank you.

              The NOSPIN Group is now offering Free PC Tech
                     support at our newest website:
                          http://freepctech.com

ATOM RSS1 RSS2

LISTSERV.ICORS.ORG Secured by F-Secure Anti-Virus CataList Email List Search Powered by LISTSERV