Results 1 to 2 of 2

Thread: Calendar AxtiveX Control

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Posts
    4

    Unhappy Calendar AxtiveX Control

    I'am trying to use the Microsoft Calendar ActiveX Control on a page so users can select a date from the Calendar. When a user selects a date, I put the value in a textbox to use in a form to query information from a database based on the chosen date.

    I have the folowing code:

    Sopose I the calendar name is Calendar1
    and the name of the textbox in my form is txtDate.

    <script language="vbscript">

    Sub StartDate_Click()
    txtDate.value = Calendar1.value
    End Sub

    </script>

    This code is fine, but I cant use the textbox in a form. I gaves some errors. When the textbox is not in the form it is OK. But I want the textbox to be in the form to post the textbox value to query the database.

    Someone have an idea how to implement this???[COLOR=skyblue]

  2. #2
    Hyperactive Member SoftwareMaker's Avatar
    Join Date
    Mar 2001
    Location
    Elbonia with Dilbert and Wally
    Posts
    322
    Hi, I understand your problem.

    I used to have some problems embedding intrinsic VB controls on a Webpage.

    Make sure you have embedded the right ClassID for your control. The only way I check it is to go to the Win Registry and make sure the ClassID is the same as the one I embed on the Webpage. Use the Forms2.0 Control. They work better...(to me)

    Also you have an error in your code.

    If your txtDate is a textbox, there is NO value property. I think you meant its TEXT property.
    William T
    Software Architect / Chief Software Developer
    Softwaremaker.Net Pte Ltd
    http://www.Softwaremaker.net

    *** Things are always the darkest before they go pitch black ***

Posting Permissions

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



Click Here to Expand Forum to Full Width