Results 1 to 4 of 4
  1. #1
    rlisoft is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2017
    Posts
    3

    [AC2013] Problem with the function CreateWindowEx on W10/64bits + Access2013/64bits


    Hello All,
    I'm new to this forum and i have a question about the function CreateWindowEx in vba.
    I have managed to make it work on W7/64bits with Access2013/64bits....(and on 32bit versions)
    (see the sample database...)

    But when i try this database on W10/64bits with Access2013/64bits CreateWindowEx does not return a valid pointer.

    Please view the sample database .accdb joined to this message.
    Please just unzip the sample base and run it...then clic on the central button to create the sample window.
    Essentialy it does this :

    lhwndWindow = CreateWindowEx(WS_EX_DLGMODALFRAME, CLASSNAME, TITLE, WS_POPUPWINDOW Or WS_CAPTION, 500, 50, 500, 500, 0&, 0&, 0&, 0&)

    And it fails on my W10/64bits computer with Access2013/64bits installed. (lhwndWindow = 0)

    Can anyone tell me why it is different in W10/64bits and how i should solve this issue ?
    Is it an antivirus issue ?

    Many thanks in advance....
    Attached Files Attached Files

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Why would you even need this function?
    but you can check for the OS version then declare....

    Code:
    #if Win64 then
       Declare PtrSafe Function MyMathFunc Lib "User32" (ByVal N As LongLong) As LongLong
    #else
       Declare Function MyMathFunc Lib "User32" (ByVal N As Long) As Long
    #end if

  3. #3
    rlisoft is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2017
    Posts
    3
    I need it to port an existing Access32bits application to Access64bits.
    It is used in a calendar class clsMonthcal and in the modCalendar module (originaly from the Lebans site) that allows to pick a range of dates....that is from date A to date B
    The #if Win64 switch is of no use here because the CreateWindowEx declaration is only dependant on the VBA7 switch.

    The issue is not on that level i think....it is W10/64bits that seems to be bugging....whereas W7/64bits and W10/32bits do it OK


    Quote Originally Posted by ranman256 View Post
    Why would you even need this function?
    but you can check for the OS version then declare....

    Code:
    #if Win64 then
       Declare PtrSafe Function MyMathFunc Lib "User32" (ByVal N As LongLong) As LongLong
    #else
       Declare Function MyMathFunc Lib "User32" (ByVal N As Long) As Long
    #end if

  4. #4
    rlisoft is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2017
    Posts
    3

    are you a robot ?

    In addition to my previeus reply....
    Did you actually tried my posted database ? And what was the result of the create window button ?
    If you don't reply to this message i must assume you are just a stupid ROBOT and other users should know about this !

    Quote Originally Posted by ranman256 View Post
    Why would you even need this function?
    but you can check for the OS version then declare....

    Code:
    #if Win64 then
       Declare PtrSafe Function MyMathFunc Lib "User32" (ByVal N As LongLong) As LongLong
    #else
       Declare Function MyMathFunc Lib "User32" (ByVal N As Long) As Long
    #end if

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

Similar Threads

  1. Replies: 0
    Last Post: 05-14-2015, 11:37 PM
  2. Sizing forms (Access2013)
    By bfc in forum Forms
    Replies: 9
    Last Post: 09-01-2014, 09:15 PM
  3. Conversion from Access 2007 to Access2013.
    By casinc815 in forum Access
    Replies: 4
    Last Post: 04-04-2014, 09:17 AM
  4. Emailing out of Access2013.
    By casinc815 in forum Access
    Replies: 2
    Last Post: 04-03-2014, 02:41 PM
  5. Problem with IIF function
    By Hulk in forum Forms
    Replies: 3
    Last Post: 03-20-2011, 12:59 PM

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