Solved

Help with outlook form

Posted on 2011-09-15
5
242 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

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.

Question has a verified solution.

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

Outlook Free & Paid Tools
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
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…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

911 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

24 Experts available now in Live!

Get 1:1 Help Now