[AccessD] Error help with upgrade from A03 to A13
John R Bartow
jbartow at winhaven.net
Thu Nov 17 00:51:09 CST 2016
Thanks for the confirmation. I searched the net and it was not quite so
clear.
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Stuart McLachlan
Sent: Wednesday, November 16, 2016 6:26 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Error help with upgrade from A03 to A13
Nope, it works for all properties. This showed me your property after I had
created it in a test Db.
For Each prp In dbs.Properties
Debug.Print prp.Name
If prp.Type > 0 Then Debug.Print prp.Value
Next
The conditional is there because otherwise I got a problem with a property
"Connection".
On 16 Nov 2016 at 17:46, John R Bartow wrote:
> Yes, it appears that is it. Now to research the old code and figure
> out why.
>
>
> I was under the impression that only built in properties displayed
> when doing this but I will double check. That would be a big help if
> it did. Thanks
>
> -----Original Message-----
> From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf
> Of John Colby Sent: Wednesday, November 16, 2016 6:45 AM To: Access
> Developers discussion and problem solving Subject: Re: [AccessD] Error
> help with upgrade from A03 to A13
>
> My guess is that you have not created the property yet (or set it's
> value) and it is returning a null. Or you are mis-spelling the
> property name.
>
> IIRC you can iterate the properties collection looking at the property
> names.
>
>
> On 11/15/2016 8:29 PM, John R Bartow wrote:
> > Converting a Access 2003 app that was originally an Access97 app to
> > an Access 2013 app.
> >
> > Converted the mdbs to 07 accdbs.
> >
> > It compiles but I get two errors when running the Splash Screen
> > which does some environment checks and opens the login screen. Any
> > help appreciated.
> >
> > I'm getting errors on this:
> > Set prp = dbs.Properties("CheckForLabelPrinter")
> > 1st error occurs here: "Type mismatch"
> >
> > If prp = True Then
> > 2nd error occurs here: Object Variable or With block variable not
> > set
> >
> > Full form code:
> >
> > ' Module : frmSplash
> > ' Description: environment checks then opens the next screen
> > ' Procedures : Form_Timer
> > ' InitErrorLog
> >
> > Option Compare Database
> > Option Explicit
> >
> > Private Sub Form_Timer()
> > ' Comments :
> > ' Parameters : -
> > ' Returns : -
> >
> > Dim dbs As Database
> > Dim prp As Property
> >
> > Set dbs = CurrentDb()
> >
> > On Error GoTo PROC_ERR
> >
> > 'Check to see if database connection is valid
> > If CheckForDB("Staff") = True Then
> > 'Check to see if Dymo Label Printer is installed
> > 'read database property to see if we should check it
> > Set prp = dbs.Properties("CheckForLabelPrinter")
> > If prp = True Then
> > If Len(DymoAddinPath()) > 0 Then
> > gfDymoInstalled = True
> > Else
> > gfDymoInstalled = False
> > End If
> > Else
> > gfDymoInstalled = False
> > End If
> >
> > ' initialize the error log
> > Call InitErrorLog
> >
> > 'Set Registry Name of App Form Settings
> > Dim strAppName As String
> >
> > 'lookup the name of the application name and version
> > strAppName = DLookup("[fldAppName]", "uSysLicense",
> > "[fldKeyID] =
> 1")
> > RunningProject (strAppName)
> >
> > 'Check to see if we can bypass login procedure because they
> > are
> logged
> > into the OS
> > If GetStaffName() = True Then
> > 'OK skip login procedures
> > DoCmd.OpenForm "fmnuMainMenu", acNormal, "", "", acEdit,
> acNormal
> > Else
> > 'Can't find them in the Staff table, make them login
> > DoCmd.OpenForm "frmLogin", acNormal, "", "", acEdit,
> > acNormal
> > End If
> > End If
> >
> > DoCmd.Close acForm, "frmSplash"
> > Exit Sub
> >
> > PROC_ERR:
> > MsgBox "The following error occurred: " & Error$
> > Resume Next
> >
> > End Sub
> >
> > Private Sub InitErrorLog()
> > ' Comments :
> > ' Parameters : -
> > ' Returns : -
> >
> > On Error GoTo PROC_ERR
> > ' initialize the error log.
> >
> > Dim fOk As Boolean
> >
> > fOk = ERH_Initialize_TSB()
> > If Not fOk Then
> > Beep
> > MsgBox "Could not initialize error handler, application will
> > exit." End
> > End If
> >
> > Exit Sub
> >
> > PROC_ERR:
> > MsgBox "The following error occurred: " & Error$
> > Resume Next
> >
> > End Sub
> >
> >
>
> --
> John W. Colby
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
More information about the AccessD
mailing list