Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Get Focus and Pass To Table (2000)

    Hello Everyone,

    I have a table with a field "strEntryDate".

    I have a form with a txtbox, ("txtEntryDate")and Calendar Control ("SetDate"). The control source for txtEntryDate is "=SetDate.Value".

    When a user selects the date from the calendar, the date is passed to txtEntryDate....this works fine but it does not pass to the field "strEntryDate" in the table. WHY? What do I need to do to pass that value to the field?

    Also, what do I need to do to get the calendar control to default to the current month...i.e. if this is July, when the form opens I want the calendar to show "July".

    Thanks in advance.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Get Focus and Pass To Table (2000)

    A control can only have one controlsource. Since you set the textbox's control source to a formula referencing your calendar control, there isn't any way for it to pass the value into the table. Instead of doing it that way, bind the textbox to the underlying field and use one of the calendar control's events to set the value of the textbox in code. That will write the value into the table.

    Are you actually using a calendar control or one of the others like a MonthView or Date Time picker? They all have different events and properties, so you have to be pretty specific to get a useful answer. The calendar control will usually default to today's date and display the current month automatically, but the others don't behave the same way.
    Charlotte

Posting Permissions

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