Results 1 to 2 of 2
2001-07-15, 22:05 #1
- Join Date
- Feb 2001
- Louisville, Kentucky, USA
- Thanked 0 Times in 0 Posts
Get Focus and Pass To Table (2000)
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>
2001-07-16, 03:06 #2
- Join Date
- Dec 2000
- Sacramento, California, USA
- 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