Hi John, Yes, I am opening this form from a switchboard. I may just put a button on the form that says "Full Screen" and go from there. Have you seen my other post about the long date problem I'm having with my query?
-----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of John Viescas Sent: Friday, January 20, 2006 10:07 AM To: [email protected] Subject: RE: [ms_access] Calendar Control Mike- Most bizarre! Putting that code in the Load event works. Putting it anywhere else (such as Open or Activate) does not work. It also does not work if there's any code that forces the form to get the focus - your Maximize is doing that, but a simple Me.SetFocus screws it up as well. Are you opening this form from another one? If so, you could try putting the code in that procedure. Like this: DoCmd.OpenForm "MyCalendar" ' Make sure the form is loaded Forms!MyCalendar.SetFocus ' .. and the calendar Forms!CalendarStart.SetFocus Me.CalendarStart.Year = Year(Date) Me.CalendarStart.Month = Month(Date) Me.CalendarStart.Day = Day(Date) ' .. any other cleanup code here - perhaps closing this form John Viescas, author "Building Microsoft Access Applications" "Microsoft Office Access 2003 Inside Out" "Running Microsoft Access 2000" "SQL Queries for Mere Mortals" http://www.viescas.com/ -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Bisson Sent: Thursday, January 19, 2006 11:16 AM To: [email protected] Subject: RE: [ms_access] Calendar Control Hi John, I figured it out, but it creates another problem. I had a docmd.maximize in the "On Open" event. When I took this out, the calendar started working properly. Where else can I put the docmd.maximize? Can I swap the two (put the calendar code in the on open event and the docmd.maximize in the on load event? -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Bisson Sent: Thursday, January 19, 2006 11:47 AM To: [email protected] Subject: RE: [ms_access] Calendar Control Hi John, Inserted that code, but it's not working. I have it in the On_Load event for the form. Should I move it to a different event? -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of John Viescas Sent: Thursday, January 19, 2006 9:30 AM To: [email protected] Subject: RE: [ms_access] Calendar Control Mike- The stupid Calendar control has separate Year, Month, and Day properties that determine what "current" date is displayed. So, do: Me.CalendarStart.Year = Year(Date) Me.CalendarStart.Month = Month(Date) Me.CalendarStart.Day = Day(Date) John Viescas, author "Building Microsoft Access Applications" "Microsoft Office Access 2003 Inside Out" "Running Microsoft Access 2000" "SQL Queries for Mere Mortals" http://www.viescas.com/ -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Bisson Sent: Wednesday, January 18, 2006 10:37 AM To: [email protected] Subject: RE: [ms_access] Calendar Control Well, I thought I had it figured out... Here goes again - I have a form with 2 calendar controls on it 1) is named CalendarStart and 2) is named CalendarStop. What I've done is in the Form_Load event, I've added the following code: CalendarStart.Value = Date CalendarStop.Value = Date But the calendars are not displaying the current date when I view the form, they are displaying the date I added the calendars to the form. As usual, any help is greatly appreciated :) -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Bisson Sent: Tuesday, January 17, 2006 2:31 PM To: [email protected] Subject: [ms_access] Calendar Control Never mind, I figured it out! ================================== Mike Bisson Manager of IT & Logistics Carthuplas, Inc. V: 207-985-4972 x658 F: 207-985-2105 [EMAIL PROTECTED] http://www.carthuplas.com Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/ms_access/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
