Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jul 2002
    Location
    Manchester, UK
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calendar Control (2000)

    I am trying to add a calendar control to a Combo Box. The idea is that the user selects a date from the calendar and that date appears in the Combo Box field and then the calendar re-hides itself. I can get the calendar to operate but not to update the Combo Box. This is the code that I have put in:

    Private Sub StartDate_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    StartCal.Visible = True
    StartCal.SetFocus
    If Not IsNull(StartDate) Then
    StartCal.Value = StartDate.Value
    Else
    StartCal.Value = Now
    End If
    StartDate.Value = StartCal.Value
    StartDate.SetFocus
    StartCal.Visible = False

    The error that I get when I click the Combo box is:

    "This recordset is not updateable".

    I would appreciate any help. I am not an expert and this is REALLY stretching by ability. THANK YOU

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Calendar Control (2000)

    Can you enter a value into any other control on the form? The error would seem to indicate that the recordsource for your form is a non-updatable query.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Calendar Control (2000)

    This article on the Office Online Assistance may help you, even though it is focused on 2003 rather than 2000. <!mskb=225982>Microsoft Knowledge Base Article 225982<!/mskb> may also give you some hints about updating controls. Finally, you don't indicate whether or not the combo box is bound to some sort of data record. If it is bound, then the error message you are getting suggests that the underlying recordset for your form is not updatable. That can happen for several reasons - the table may not have a primary key, or you may have inconsistent joins that make the recordset not updatable. Those are just a couple of examples.
    Wendell

Posting Permissions

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