Solved

Help with outlook form

Posted on 2011-09-15
5
243 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
ID: 36548386
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
ID: 36548642
give me a bit to add your suggestions and test. also will compose the relationships.

thanks.
0
 

Author Comment

by:jriver12
ID: 36549287
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
ID: 36550024
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
ID: 36550099
will test and let you know.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Read this checklist to learn more about the 15 things you should never include in an email signature.
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

770 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