Prev: update tables
Next: ciao
From: xbound on 5 Mar 2010 20:32 Thanks for all the responses. Mine is 32 bit. After installing SP2, the compilation error goes away. When I use Access 2007 to open my projects , whether old or new, it will say it's in "Access 2000 File Format". So far everything is fine until this problem comes up. Things like that took a long time to troubleshoot..... "Gina Whipp" <NotInterested(a)InViruses.com> wrote in message news:OvNoAiMvKHA.5340(a)TK2MSFTNGP04.phx.gbl... > Mark, > > Hopefully, the OP will post back. I found I had to run my Access 2003 in > compatiblity mode, aslo 64 bit but my Access 2007 is fine as long as in a > Trusted Location. But all we can do is wait and see... > -- > Gina Whipp > 2010 Microsoft MVP (Access) > > "I feel I have been denied critical, need to know, information!" - Tremors > II > > http://www.regina-whipp.com/index_files/TipList.htm > > "Mark Andrews" <mandrews___NOSPAM___(a)rptsoftware.com> wrote in message > news:eFuvyNMvKHA.5980(a)TK2MSFTNGP05.phx.gbl... > Mine is 64bit. Not in compatibility mode. However I'm not the one with > the > issue. > Mark > > "Gina Whipp" <NotInterested(a)InViruses.com> wrote in message > news:uwKmlKLvKHA.1964(a)TK2MSFTNGP04.phx.gbl... >> Was that Windows 7 64 bit or 32 bit? And are either of you running in >> Compatibly Mode? >> >> "Mark Andrews" <mandrews___NOSPAM___(a)rptsoftware.com> wrote in message >> news:uRbAA6KvKHA.1796(a)TK2MSFTNGP02.phx.gbl... >> I just copied your code into a new database in Access 2007 sp2 on my >> Windows >> 7 laptop and it worked fine. >> >> HTH, >> Mark >> >> "xbound" <ekwong999(a)hotmail.com> wrote in message >> news:162CFB93-ADF0-4D33-9495-5B8FF564C99E(a)microsoft.com... >>> I have the following code to get the network login name: >>> >>> Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _ >>> "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long >>> >>> Function fOSUserName() As String >>> ' Returns the network login name >>> Dim lngLen As Long, lngX As Long >>> Dim strUserName As String >>> strUserName = String$(254, 0) >>> lngLen = 255 >>> lngX = apiGetUserName(strUserName, lngLen) >>> If lngX <> 0 Then >>> fOSUserName = Left$(strUserName, lngLen - 1) >>> Else >>> fOSUserName = vbNullString >>> End If >>> End Function >>> >>> >>> This code is available widely from the internet and I've been using it >>> in >>> a couple of my Access projects with no problem. Then lately I created >>> a >>> new Access project and import the form containing that piece of code >>> straight from one of the old projects. However; as soon as that >>> function >>> is entered, I would get an error : "Compile error. Type declaration >>> does >>> not match declared data type." such that I couldn't examine the values >>> of variables there. It seems the statement "fOSUserName = >>> Left$(strUserName, lngLen - 1)" is causing trouble. If I comment out >>> that >>> statement, I don't get any error but of course I won't get the network >>> login name either. As a precaution I stepped through the function in >>> the old project and found that everything is working as expected. >>> >>> The old adp projects were created in Access 2003 on a XP workstation. >>> The new project was created in Access 2007 on a Win 7 workstation. >>> Since >>> the old projects are functioning perfectly on the Win 7 machine, I >>> gather >>> that the Access version and the OS platform are not the issues. This >>> only makes the problem more baffling to me. Maybe someone could spot >>> or >>> have an idea what I've missed? >>> >>> thanks. >> >
From: xbound on 9 Mar 2010 13:43 I've posted back last week but for some reason it's not showing up. Thanks for all the responses. After applying SP2, the compile error went away. Things like this is really hard to troubleshoot ...... "Gina Whipp" <NotInterested(a)InViruses.com> wrote in message news:OvNoAiMvKHA.5340(a)TK2MSFTNGP04.phx.gbl... > Mark, > > Hopefully, the OP will post back. I found I had to run my Access 2003 in > compatiblity mode, aslo 64 bit but my Access 2007 is fine as long as in a > Trusted Location. But all we can do is wait and see... > -- > Gina Whipp > 2010 Microsoft MVP (Access) > > "I feel I have been denied critical, need to know, information!" - Tremors > II > > http://www.regina-whipp.com/index_files/TipList.htm > > "Mark Andrews" <mandrews___NOSPAM___(a)rptsoftware.com> wrote in message > news:eFuvyNMvKHA.5980(a)TK2MSFTNGP05.phx.gbl... > Mine is 64bit. Not in compatibility mode. However I'm not the one with > the > issue. > Mark > > "Gina Whipp" <NotInterested(a)InViruses.com> wrote in message > news:uwKmlKLvKHA.1964(a)TK2MSFTNGP04.phx.gbl... >> Was that Windows 7 64 bit or 32 bit? And are either of you running in >> Compatibly Mode? >> >> "Mark Andrews" <mandrews___NOSPAM___(a)rptsoftware.com> wrote in message >> news:uRbAA6KvKHA.1796(a)TK2MSFTNGP02.phx.gbl... >> I just copied your code into a new database in Access 2007 sp2 on my >> Windows >> 7 laptop and it worked fine. >> >> HTH, >> Mark >> >> "xbound" <ekwong999(a)hotmail.com> wrote in message >> news:162CFB93-ADF0-4D33-9495-5B8FF564C99E(a)microsoft.com... >>> I have the following code to get the network login name: >>> >>> Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _ >>> "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long >>> >>> Function fOSUserName() As String >>> ' Returns the network login name >>> Dim lngLen As Long, lngX As Long >>> Dim strUserName As String >>> strUserName = String$(254, 0) >>> lngLen = 255 >>> lngX = apiGetUserName(strUserName, lngLen) >>> If lngX <> 0 Then >>> fOSUserName = Left$(strUserName, lngLen - 1) >>> Else >>> fOSUserName = vbNullString >>> End If >>> End Function >>> >>> >>> This code is available widely from the internet and I've been using it >>> in >>> a couple of my Access projects with no problem. Then lately I created >>> a >>> new Access project and import the form containing that piece of code >>> straight from one of the old projects. However; as soon as that >>> function >>> is entered, I would get an error : "Compile error. Type declaration >>> does >>> not match declared data type." such that I couldn't examine the values >>> of variables there. It seems the statement "fOSUserName = >>> Left$(strUserName, lngLen - 1)" is causing trouble. If I comment out >>> that >>> statement, I don't get any error but of course I won't get the network >>> login name either. As a precaution I stepped through the function in >>> the old project and found that everything is working as expected. >>> >>> The old adp projects were created in Access 2003 on a XP workstation. >>> The new project was created in Access 2007 on a Win 7 workstation. >>> Since >>> the old projects are functioning perfectly on the Win 7 machine, I >>> gather >>> that the Access version and the OS platform are not the issues. This >>> only makes the problem more baffling to me. Maybe someone could spot >>> or >>> have an idea what I've missed? >>> >>> thanks. >> >
From: Gina Whipp on 9 Mar 2010 13:56 Glad to hear all is well! -- Gina Whipp 2010 Microsoft MVP (Access) "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "xbound" <ekwong999(a)hotmail.com> wrote in message news:42D4867D-7A35-4143-8B95-23785ACF81A9(a)microsoft.com... I've posted back last week but for some reason it's not showing up. Thanks for all the responses. After applying SP2, the compile error went away. Things like this is really hard to troubleshoot ...... "Gina Whipp" <NotInterested(a)InViruses.com> wrote in message news:OvNoAiMvKHA.5340(a)TK2MSFTNGP04.phx.gbl... > Mark, > > Hopefully, the OP will post back. I found I had to run my Access 2003 in > compatiblity mode, aslo 64 bit but my Access 2007 is fine as long as in a > Trusted Location. But all we can do is wait and see... > -- > Gina Whipp > 2010 Microsoft MVP (Access) > > "I feel I have been denied critical, need to know, information!" - Tremors > II > > http://www.regina-whipp.com/index_files/TipList.htm > > "Mark Andrews" <mandrews___NOSPAM___(a)rptsoftware.com> wrote in message > news:eFuvyNMvKHA.5980(a)TK2MSFTNGP05.phx.gbl... > Mine is 64bit. Not in compatibility mode. However I'm not the one with > the > issue. > Mark > > "Gina Whipp" <NotInterested(a)InViruses.com> wrote in message > news:uwKmlKLvKHA.1964(a)TK2MSFTNGP04.phx.gbl... >> Was that Windows 7 64 bit or 32 bit? And are either of you running in >> Compatibly Mode? >> >> "Mark Andrews" <mandrews___NOSPAM___(a)rptsoftware.com> wrote in message >> news:uRbAA6KvKHA.1796(a)TK2MSFTNGP02.phx.gbl... >> I just copied your code into a new database in Access 2007 sp2 on my >> Windows >> 7 laptop and it worked fine. >> >> HTH, >> Mark >> >> "xbound" <ekwong999(a)hotmail.com> wrote in message >> news:162CFB93-ADF0-4D33-9495-5B8FF564C99E(a)microsoft.com... >>> I have the following code to get the network login name: >>> >>> Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _ >>> "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long >>> >>> Function fOSUserName() As String >>> ' Returns the network login name >>> Dim lngLen As Long, lngX As Long >>> Dim strUserName As String >>> strUserName = String$(254, 0) >>> lngLen = 255 >>> lngX = apiGetUserName(strUserName, lngLen) >>> If lngX <> 0 Then >>> fOSUserName = Left$(strUserName, lngLen - 1) >>> Else >>> fOSUserName = vbNullString >>> End If >>> End Function >>> >>> >>> This code is available widely from the internet and I've been using it >>> in >>> a couple of my Access projects with no problem. Then lately I created >>> a >>> new Access project and import the form containing that piece of code >>> straight from one of the old projects. However; as soon as that >>> function >>> is entered, I would get an error : "Compile error. Type declaration >>> does >>> not match declared data type." such that I couldn't examine the values >>> of variables there. It seems the statement "fOSUserName = >>> Left$(strUserName, lngLen - 1)" is causing trouble. If I comment out >>> that >>> statement, I don't get any error but of course I won't get the network >>> login name either. As a precaution I stepped through the function in >>> the old project and found that everything is working as expected. >>> >>> The old adp projects were created in Access 2003 on a XP workstation. >>> The new project was created in Access 2007 on a Win 7 workstation. >>> Since >>> the old projects are functioning perfectly on the Win 7 machine, I >>> gather >>> that the Access version and the OS platform are not the issues. This >>> only makes the problem more baffling to me. Maybe someone could spot >>> or >>> have an idea what I've missed? >>> >>> thanks. >> >
From: xbound on 9 Mar 2010 15:40 I run the thing today and it's NOT working again. Really frustrating.... "Gina Whipp" <NotInterested(a)InViruses.com> wrote in message news:unE1uo7vKHA.812(a)TK2MSFTNGP06.phx.gbl... > Glad to hear all is well! > > -- > Gina Whipp > 2010 Microsoft MVP (Access) > > "I feel I have been denied critical, need to know, information!" - Tremors > II > > http://www.regina-whipp.com/index_files/TipList.htm > > "xbound" <ekwong999(a)hotmail.com> wrote in message > news:42D4867D-7A35-4143-8B95-23785ACF81A9(a)microsoft.com... > I've posted back last week but for some reason it's not showing up. > > Thanks for all the responses. After applying SP2, the compile error went > away. Things like this is really hard to troubleshoot ...... > > > "Gina Whipp" <NotInterested(a)InViruses.com> wrote in message > news:OvNoAiMvKHA.5340(a)TK2MSFTNGP04.phx.gbl... >> Mark, >> >> Hopefully, the OP will post back. I found I had to run my Access 2003 in >> compatiblity mode, aslo 64 bit but my Access 2007 is fine as long as in a >> Trusted Location. But all we can do is wait and see... >> -- >> Gina Whipp >> 2010 Microsoft MVP (Access) >> >> "I feel I have been denied critical, need to know, information!" - >> Tremors >> II >> >> http://www.regina-whipp.com/index_files/TipList.htm >> >> "Mark Andrews" <mandrews___NOSPAM___(a)rptsoftware.com> wrote in message >> news:eFuvyNMvKHA.5980(a)TK2MSFTNGP05.phx.gbl... >> Mine is 64bit. Not in compatibility mode. However I'm not the one with >> the >> issue. >> Mark >> >> "Gina Whipp" <NotInterested(a)InViruses.com> wrote in message >> news:uwKmlKLvKHA.1964(a)TK2MSFTNGP04.phx.gbl... >>> Was that Windows 7 64 bit or 32 bit? And are either of you running in >>> Compatibly Mode? >>> >>> "Mark Andrews" <mandrews___NOSPAM___(a)rptsoftware.com> wrote in message >>> news:uRbAA6KvKHA.1796(a)TK2MSFTNGP02.phx.gbl... >>> I just copied your code into a new database in Access 2007 sp2 on my >>> Windows >>> 7 laptop and it worked fine. >>> >>> HTH, >>> Mark >>> >>> "xbound" <ekwong999(a)hotmail.com> wrote in message >>> news:162CFB93-ADF0-4D33-9495-5B8FF564C99E(a)microsoft.com... >>>> I have the following code to get the network login name: >>>> >>>> Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _ >>>> "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long >>>> >>>> Function fOSUserName() As String >>>> ' Returns the network login name >>>> Dim lngLen As Long, lngX As Long >>>> Dim strUserName As String >>>> strUserName = String$(254, 0) >>>> lngLen = 255 >>>> lngX = apiGetUserName(strUserName, lngLen) >>>> If lngX <> 0 Then >>>> fOSUserName = Left$(strUserName, lngLen - 1) >>>> Else >>>> fOSUserName = vbNullString >>>> End If >>>> End Function >>>> >>>> >>>> This code is available widely from the internet and I've been using it >>>> in >>>> a couple of my Access projects with no problem. Then lately I created >>>> a >>>> new Access project and import the form containing that piece of code >>>> straight from one of the old projects. However; as soon as that >>>> function >>>> is entered, I would get an error : "Compile error. Type declaration >>>> does >>>> not match declared data type." such that I couldn't examine the >>>> values >>>> of variables there. It seems the statement "fOSUserName = >>>> Left$(strUserName, lngLen - 1)" is causing trouble. If I comment out >>>> that >>>> statement, I don't get any error but of course I won't get the network >>>> login name either. As a precaution I stepped through the function in >>>> the old project and found that everything is working as expected. >>>> >>>> The old adp projects were created in Access 2003 on a XP workstation. >>>> The new project was created in Access 2007 on a Win 7 workstation. >>>> Since >>>> the old projects are functioning perfectly on the Win 7 machine, I >>>> gather >>>> that the Access version and the OS platform are not the issues. This >>>> only makes the problem more baffling to me. Maybe someone could spot >>>> or >>>> have an idea what I've missed? >>>> >>>> thanks. >>> >> >
From: Gina Whipp on 9 Mar 2010 16:14
xbound, Is your database in a Trusted Location? http://www.regina-whipp.com/index_files/TrustedLocation.htm -- Gina Whipp 2010 Microsoft MVP (Access) "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "xbound" <ekwong999(a)hotmail.com> wrote in message news:F5B63B0B-888C-48C4-AA96-30E5DDB2EEC0(a)microsoft.com... I run the thing today and it's NOT working again. Really frustrating.... "Gina Whipp" <NotInterested(a)InViruses.com> wrote in message news:unE1uo7vKHA.812(a)TK2MSFTNGP06.phx.gbl... > Glad to hear all is well! > > -- > Gina Whipp > 2010 Microsoft MVP (Access) > > "I feel I have been denied critical, need to know, information!" - Tremors > II > > http://www.regina-whipp.com/index_files/TipList.htm > > "xbound" <ekwong999(a)hotmail.com> wrote in message > news:42D4867D-7A35-4143-8B95-23785ACF81A9(a)microsoft.com... > I've posted back last week but for some reason it's not showing up. > > Thanks for all the responses. After applying SP2, the compile error went > away. Things like this is really hard to troubleshoot ...... > > > "Gina Whipp" <NotInterested(a)InViruses.com> wrote in message > news:OvNoAiMvKHA.5340(a)TK2MSFTNGP04.phx.gbl... >> Mark, >> >> Hopefully, the OP will post back. I found I had to run my Access 2003 in >> compatiblity mode, aslo 64 bit but my Access 2007 is fine as long as in a >> Trusted Location. But all we can do is wait and see... >> -- >> Gina Whipp >> 2010 Microsoft MVP (Access) >> >> "I feel I have been denied critical, need to know, information!" - >> Tremors >> II >> >> http://www.regina-whipp.com/index_files/TipList.htm >> >> "Mark Andrews" <mandrews___NOSPAM___(a)rptsoftware.com> wrote in message >> news:eFuvyNMvKHA.5980(a)TK2MSFTNGP05.phx.gbl... >> Mine is 64bit. Not in compatibility mode. However I'm not the one with >> the >> issue. >> Mark >> >> "Gina Whipp" <NotInterested(a)InViruses.com> wrote in message >> news:uwKmlKLvKHA.1964(a)TK2MSFTNGP04.phx.gbl... >>> Was that Windows 7 64 bit or 32 bit? And are either of you running in >>> Compatibly Mode? >>> >>> "Mark Andrews" <mandrews___NOSPAM___(a)rptsoftware.com> wrote in message >>> news:uRbAA6KvKHA.1796(a)TK2MSFTNGP02.phx.gbl... >>> I just copied your code into a new database in Access 2007 sp2 on my >>> Windows >>> 7 laptop and it worked fine. >>> >>> HTH, >>> Mark >>> >>> "xbound" <ekwong999(a)hotmail.com> wrote in message >>> news:162CFB93-ADF0-4D33-9495-5B8FF564C99E(a)microsoft.com... >>>> I have the following code to get the network login name: >>>> >>>> Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _ >>>> "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long >>>> >>>> Function fOSUserName() As String >>>> ' Returns the network login name >>>> Dim lngLen As Long, lngX As Long >>>> Dim strUserName As String >>>> strUserName = String$(254, 0) >>>> lngLen = 255 >>>> lngX = apiGetUserName(strUserName, lngLen) >>>> If lngX <> 0 Then >>>> fOSUserName = Left$(strUserName, lngLen - 1) >>>> Else >>>> fOSUserName = vbNullString >>>> End If >>>> End Function >>>> >>>> >>>> This code is available widely from the internet and I've been using it >>>> in >>>> a couple of my Access projects with no problem. Then lately I created >>>> a >>>> new Access project and import the form containing that piece of code >>>> straight from one of the old projects. However; as soon as that >>>> function >>>> is entered, I would get an error : "Compile error. Type declaration >>>> does >>>> not match declared data type." such that I couldn't examine the >>>> values >>>> of variables there. It seems the statement "fOSUserName = >>>> Left$(strUserName, lngLen - 1)" is causing trouble. If I comment out >>>> that >>>> statement, I don't get any error but of course I won't get the network >>>> login name either. As a precaution I stepped through the function in >>>> the old project and found that everything is working as expected. >>>> >>>> The old adp projects were created in Access 2003 on a XP workstation. >>>> The new project was created in Access 2007 on a Win 7 workstation. >>>> Since >>>> the old projects are functioning perfectly on the Win 7 machine, I >>>> gather >>>> that the Access version and the OS platform are not the issues. This >>>> only makes the problem more baffling to me. Maybe someone could spot >>>> or >>>> have an idea what I've missed? >>>> >>>> thanks. >>> >> > |