Results 1 to 3 of 3
  1. #1
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496

    32-bit vs 64-bit

    OUCH... got my first taste of "your code is OLD, and needs to be updated..." of course at the most inopportune time (oh well).
    So, I don't know the 1st thing about 32 and 64; never-the-less, I update the code in a declare statement

    Code:
    If Win64 Then
       Declare PtrSafe Function apiGetUserName Lib "advapi32.dll" Alias _
        "GetUserNameA" (ByVal lpBuffer As String, nSize As LongLong) As LongLong
    Else
       Declare Function apiGetUserName Lib "advapi32.dll" Alias _
        "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
    End If
    the second portion (the original code) worked fine, but the first (Declare PtrSafe Function...) returned this error: expected sub or function...
    HUH?

    (you should also know, the error occurred on a 64bit machine, the one that I use (for programming) is only 32-bit; the database will be used on both)



    many thaks in advance,
    mark

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    If I understand correctly.
    You are using a 32 bit Access.

    If so, as far as I know it does not matter what windows version you are using, 32 or 64 bit.

    Dale

  3. #3
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496
    I am using 32 bit, a I definitely gotten the error on a 64 bit software; since then I started doing some research
    ow-chi-wow-wa !!!!

    32, 64
    VBA 7

    lot to learn (for this obviously self taught)

    OK... journey ahead !

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums