Solved

Help with outlook form

Posted on 2011-09-15
5
241 Views
Last Modified: 2012-05-12
I have a custom Meeting Form that I am creating for use in Outlook 2010. The problem I am having is when I create the Date Picker and Time Picker, and then pulling the values together as a date.

Attached is the code I am trying to get working.

Here is how the Start and End names are defined:

The field End on appointments is named txtEndTime

The field Start on appointments is named txtStartTime

I have experimented with MsgBox varType(variable here) and get a return of 7 which I want. This all changes though when I try to combine the date and time into one field like Start. It then returns a variable of 8 which means a string.


Any help greatly appreciated!
My script.




 formscript.txt
0
Comment
Question by:jriver12
  • 3
  • 2
5 Comments
 
LVL 45

Accepted Solution

by:
aikimark earned 500 total points
Comment Utility
1. Add Option Explicit to the General Declarations section
2. It might be helpful if you used specific data types for your variables.
3. Please explain the relationship/use of these controls:
txtStartTime and tmeStartTime
txtEndTime and tmeEndTime
0
 

Author Comment

by:jriver12
Comment Utility
give me a bit to add your suggestions and test. also will compose the relationships.

thanks.
0
 

Author Comment

by:jriver12
Comment Utility
I am still having the issue, but have isolated it to be On submit states invalid date. Further investigating shows the combined value is a string and not a date, even when I use CDate when trying to put together the time and date fields. ie timefiled = 12:00:00 and date field = 06/06/2012, cdate would = timefield datefield.
0
 
LVL 45

Expert Comment

by:aikimark
Comment Utility
there needs to be a space character between them when fed into the CDate() function.

You can also use the TimeSerial() function to create the time component and add it to your date variable.
0
 

Author Comment

by:jriver12
Comment Utility
will test and let you know.
0

Featured Post

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

Join & Write a Comment

Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
Viewers will learn the different options available in the Backstage view in Excel 2013.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

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

11 Experts available now in Live!

Get 1:1 Help Now