Results 1 to 7 of 7
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919

    Disable date picker when mde running in A2007 or greater

    I have an app developed in A2003 that sometimes runs in a A2007 or A2010 runtime environment. In those cases, I want to disable the builtin date picker.



    I tried this:

    Code:
    Private Sub Form_Open(Cancel As Integer)
    If SysCmd(acSysCmdAccessVer) >= 12 Then Me.tbLedDate.Properties.ShowDatePicker = "Never"
    End Sub
    in the OnOpen event of the form that contains the control (tbLedDate) where I'm wanting to disable the picker. A2010 did not like the "ShowDatePicker" as a valid property.

    How can I disable the picker from showing?

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Try taking the ".properties" out; use

    Me.tbLedDate.ShowDatePicker = "Never"

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919
    Still get "Method or Data Member not found" with your suggestion. Could I be missing a Reference pertaining to A2007 or A2010?

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    ShowDatePicker takes an Integer for an argument...not a String!

    0/Do Not Display

    1/Display


    Try

    Then Me.tbLedDate.ShowDatePicker = 0

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919
    Using:

    Me.tbLedDate.ShowDatePicker = 0

    Will not compile. A2003 does not recognize "ShowDatePicker" as a valid property. Error issued: "Method or Data Member not found"

  6. #6
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Well, that makes sense...since the DatePicker didn't exist until AC2007! What happens if you compile it in 2007 or 2010 and then run it in 2003?

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  7. #7
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919
    Yes, that's what I've concluded as well. I changed the code to test for Access version and simply suppress the use of Allen Browne's popup calendar when runtime is A2007 or higher. I could still use Allen's popup even with A2007 and A2010, but the user objects to the residual appearance of the "datepicker" icon after the Allen's popup closes.

    Your idea would probably work and I'll give it a test next week if I can find time.

    Thanks,
    Bill

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

Similar Threads

  1. Replies: 11
    Last Post: 06-28-2015, 06:42 PM
  2. Date Picker for running a Query
    By smckenna in forum Queries
    Replies: 8
    Last Post: 02-26-2015, 12:43 PM
  3. Greater than or equal to date
    By stryder09 in forum Access
    Replies: 1
    Last Post: 04-14-2011, 03:54 PM
  4. Greater than date
    By I-am-me in forum Queries
    Replies: 1
    Last Post: 08-18-2009, 05:21 AM
  5. Replies: 1
    Last Post: 12-09-2005, 10:29 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