Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: calendar control and requery method


Message #1 by "Howard Stone" <ququmber@h...> on Sat, 20 Apr 2002 07:43:47
I have a textbox of date data type.  It is bound to a calendar on the 
form. The control Source of the calendar is the textbox. When I click the 
calendar and change the date the date in the text box change to that of 
the calendar.

To achieve this I had to attach a requery of the form to the afterupdate 
event of the calendar.  I am finding out that by doing this the form is 
automatically saved in the process.

I do not want that to happen because I want to give the user the option to 
undo the entries and cancel if they decide to before the saving.  Also 
there are fields on the form that must be populated before the form is 
saved.  When I click the calendar I get a form error saying that the 
relevant control must be populated before the form can be updated.  I had 
to remove these requirements to use the calendar control. 

Because the form is saved the Undo method does not clear the entry since 
the records were saved in the requery of the form.

How can I get the textbox to be automatically updated and not having to do 
the Requery.

Thanks

  Return to Index