Solved

Outlook Forms, I need a Date & Time Picker!!!

Posted on 2006-11-27
21
810 Views
Last Modified: 2008-01-09
Hi guys

This is a two part question.

Firstly iam using outlook 2007.

Now i want to create a new form to schedule jobs, works exactly the same way as a new appointment except with a few extra fields.

Now when i select start and end to put on the new form (P.2), it comes up as a text box, not a drop down to a calander like it should.

Ive had a read around seems its a limitation with outlook, but iam pretty sure they came around it with the 2007 outlook? not sure where i read it.

Anyway, whats the easiest way to get.

1. The calander exactly like the appointment form
2. And the time drop down box exactly like the appointment form.

You help is really appreciated if u can show me how to do this!

0
Comment
Question by:swiftlink
  • 12
  • 7
21 Comments
 
LVL 8

Expert Comment

by:RickJ
Comment Utility
I dont use 2007, but have 2003.
The Date Time Picker is not a standard control on the toolbox.
To add it, I right clicked on the toolbox, click on custom controls, then added the Microsoft Date Time Picker.
It is then available to drop onto the form and customize.

Hope this helps.
0
 

Author Comment

by:swiftlink
Comment Utility
it does, ive got that microsoft one on like you said.

I customerized it to look just like the text box. I ran it, and it puts a new appointment on the date i said.

How do u do time drop down box as date is useless without it?

0
 

Author Comment

by:swiftlink
Comment Utility
also when i double click on the new apppointment form in the calender, it says

To help prevent malicious code from running, one of more objects in this form were not loaded, for more information, contact your administrator.

Any ideas how to allow it??? obvously it doesnt like it.
0
 

Author Comment

by:swiftlink
Comment Utility
great i got the time one working

what i did was make a drop down box, incuded all the time values, and it works =D

just need to allow the error to be resolved.
0
 
LVL 8

Expert Comment

by:RickJ
Comment Utility
Just add a combobox and add in your time values.
0
 
LVL 8

Expert Comment

by:RickJ
Comment Utility
Sorry didnt see your last post :)...
This solution fixed the same issue for me...

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21200387.html
0
 

Author Comment

by:swiftlink
Comment Utility
thanks for that link, it fixed the issue.

I was testing it again before, and looks like the date doesnt fuction properly.

I set the date for tomorrow, and it always shows up today?

the time works fine though.

The date box has these fields

Choose Field: Start
Type: Date/Time
Format: Tuesday, 28th November 2006 3:30 PM
Property to Use: Value
0
 

Author Comment

by:swiftlink
Comment Utility
After extensive Testing i found these problems. Keep in mind my layout is just like the appointment form.

1. When clicking on the start date, i select a date, the end date does nto change unless i click on something else.

2. After i set the date and click on the drop down box for the time the date resets back to today. (probably why i cant make an appointment in the future unless i dont touch the time box.
0
 

Author Comment

by:swiftlink
Comment Utility
how is yours workig, what do u use it for?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:swiftlink
Comment Utility
*working
0
 

Author Comment

by:swiftlink
Comment Utility
from what i can see, something about having two boxes, both using the end field, is not dynamic.

Should both the date and time box use end as the field or something else.

0
 
LVL 8

Expert Comment

by:RickJ
Comment Utility
Hello swiftlink.
Sorry for the delayed response. I got busy.
Maybe if you tell me exactly what you want your form to do, I will then be able to give the best instructions.
0
 

Author Comment

by:swiftlink
Comment Utility
Hi rick

well the form is to create a job request from my customers.

It looks similar to the normal appointment form, excpet with fields such as problem description, resolution etc.

This is so i can keep track of every customer, and jobs i have done for them.

0
 

Author Comment

by:swiftlink
Comment Utility
This is what i did

When into design new form using appointment.

Added microsoft date & time picker to the control list.

Added the 1st picker, using start field.

Choose Field: Start
Type: Date/Time
Format: Tuesday, 28th November 2006 3:30 PM
Property to Use: Value

Same went for end date

Choose Field: End
Type: Date/Time
Format: Tuesday, 28th November 2006 3:30 PM
Property to Use: Value

Then created a combo box, with time values.

Also tried a picker as well using these details

Choose Field: Start
Type: Date/Time
Format: 3:30 PM
Property to Use: Value

And still either box will overrides the value of the other one.

ie, when i click on start date, choose a date, then click on start time, choose a time.

The time value will override the date i just choose.
0
 
LVL 8

Expert Comment

by:RickJ
Comment Utility
Hello swiftlink,
Sorry again for the delay.
How did you go with this?
What you need to do in this situation is not set the property to anything.
You will need to put some code behind these to set the end or start by adding the value of the two datepickers together.
Make sense??
0
 

Author Comment

by:swiftlink
Comment Utility
i do get you, any chance u know the code??
0
 
LVL 8

Expert Comment

by:RickJ
Comment Utility
Yes, try this

Add a datetimepicker to your form.
Add a combobox to your form.

Then click on the Form menu, View Code
Then paste this (This will do the start, add another datetimpicker + combo for the end)

Function Item_Write()
  Set objPage = _
      Item.GetInspector.ModifiedFormPages("P.2")
  Set objControl1 = objPage.Controls("DTPicker1")
  Set objControl2 = objPage.Controls("ComboBox1")

   With Item
    .Start = objControl1.Value + CDate(objControl2.Value)  
  End With

End Function
   
Function Item_Open()
  Set objPage = _
      Item.GetInspector.ModifiedFormPages("P.2")
  Set objControl3 = objPage.Controls("ComboBox1")
 
  objControl3.AddItem "12:00 AM"
  objControl3.AddItem "12:30 AM"
  objControl3.AddItem "1:00 AM"

End Function
0
 

Author Comment

by:swiftlink
Comment Utility
Thank you so much, that worked.

So what is the go to create the end time and date?

0
 
LVL 8

Accepted Solution

by:
RickJ earned 500 total points
Comment Utility
You would just add another Datepicker and combo to the form for the end time.
Then your code would look something like this...

Function Item_Write()
Set objPage = _
Item.GetInspector.ModifiedFormPages("P.2")
Set objControl1 = objPage.Controls("DTPicker1")
Set objControl2 = objPage.Controls("ComboBox1")
Set objControl5 = objPage.Controls("DTPicker2")
Set objControl6 = objPage.Controls("ComboBox2")


With Item
.Start = objControl1.Value + CDate(objControl2.Value)
.End = objControl5.Value + CDate(objControl6.Value)
End With

End Function

Function Item_Open()
Set objPage = _
Item.GetInspector.ModifiedFormPages("P.2")
Set objControl3 = objPage.Controls("ComboBox1")
Set objControl4 = objPage.Controls("ComboBox2")


objControl3.AddItem "12:00 AM"
objControl3.AddItem "12:30 AM"
objControl3.AddItem "1:00 AM"
objControl4.AddItem "12:00 AM"
objControl4.AddItem "12:30 AM"
objControl4.AddItem "1:00 AM"


End Function
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Use email signature images to promote corporate certifications and industry awards.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now