Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2011
    Posts
    2

    Unanswered: Crash on 'On Click' event in text box

    Hi all,


    Having an issue that I can't seem to resolve.

    I have an unbound text box that has an event procedure 'On Click' as:

    Private Sub txtDueDate_Click()
    DoCmd.OpenForm "frmSelectDate", acNormal, , , , acDialog, "CreateDue"
    End Sub

    When loading 'frmSelectDate', this code is run:

    Private Sub Form_Load()

    Me.cldSelectDate.Value = Now()

    End Sub

    The text box is unbound because the fields on the form create a new task (or populate some fields in a table) when 'OK' command button is clicked. Therefore it can't be associated with a 'date/time' database field.

    The database has users with different rights.

    On my laptop (as Admin), the command above works fine and frmSelectDate opens and I can select a date from it.

    Another database user crashes the database when they click in this text field. However, when they log on to another computer, it works fine with the same log on.

    I'm thinking its a date/time format issue but can't seem to resolve it.

    Any ideas?

    Cheers
    Brad

    edit: cldSelectDate is an ActiveX Control, OLE class 'Calendar' and class 'MSCal.Calendar.7' DayLength = 'System (Medium)'
    Last edited by bsp1; 12-22-11 at 00:53.

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    MSCal.Calendar is an ActiveX Control and use of these Controls, especially for Calendars, is frequently problematical, secondary to the differences in the versions loaded on any given machine. For this reason most developers go with Form-based Calendars that don't generate these kind of problems.

    Allen Browne offers an excellent one here

    Microsoft Access tips: Popup Calendar

    and a number of others can be found by an online search using 'Form based', 'Calendar' and 'MS Access.'

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Dec 2011
    Posts
    2
    Thanks Linq!

    I'll use another form based calendar from here.

    Cheers
    Brad

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    That's really the best thing until you move up to 2007/2010 where they now have a native calendar as part of all Date/Time Fields.

    Have a great holiday!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •