Lost Date Time Picker !?

E

E.Zenker

I created a form using the DateTimePicker Control to write in a field.
Then I removed the code of the DateTimePicker Control from the form.
When I publish the form to another computer where the DateTimePicker Control
is not installed, the form does not work.
If I install the DateTimePicker Control the form is working without
problems.
I want to sent this contact form to other people who does not have this
control.
In the fact I am not using the DateTimePicker Control but it must be
somewhere in the form, but I cannot find it.
If I put in the form another DTP Control in the list of the fields it is
shown as DTP2 but there is no DTP1. Also in the code there is now thing
concerning DTP.
Has someone an idea who to find and to remove this control.
Thanks for replies
E.Zenker
 
T

Tom Rizzo [MSFT]

You may want to blow away your form if you can and recreate. Otherwise,
have you expanded the form to see if it's anywhere off the screen that you
can't see?

Tom
 
E

E.Zenker

Thanks for your answer
create new is too much work.
expanding was not sucessfull.

i rememer something to adjust DTP size with some code? but lost it.
if you can help me to adjust the size very big, i can find it then.

E.zenker
 
K

Ken Slovak - [MVP - Outlook]

In Item_Open just set the Height and Width properties of the control to
whatever you want. You will of course need to get a handle for the control
by using code something like:

Set oControl =
Item.GetInspector.ModifiedFormPages("myPage").Controls("DTPicker")
 
E

E.Zenker

Thanks for your replay
but i can not understand what yoe mean.
would you be so kind to tel me what code i should put in the form to get a
big DTP.

thanks a lot
E.Zenker
 
K

Ken Slovak - [MVP - Outlook]

You wanted code that would size your DTPicker control very large. I provided
it. You need to know the name that was given to the DTPicker to use it and
you need to select the size you want to make the control assume. If you
didn't rename the control and it's the only one on the form it would be
named DTPicker1.
 
E

E.Zenker

Hi
so

Set oControl = DTPicker1
Item.GetInspector.ModifiedFormPages("myPage").Controls("DTPicker1")

The DTP was on page 1 How do i say this?
how can i set the size ?

Con anyane drop the missing lines of code please

Thanks alot
E.Zenker
 
S

Sue Mosher [MVP-Outlook]

Set DTPicker1 =
Item.GetInspector.ModifiedFormPages("myPage").Controls("DTPicker1")
DTPicker1.Height = 75
DTPicker1.Width = 100

Assuming "myPage" is the name of the page, which seems unlikely. You'll have
to replace it with the actual name.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
E

E.Zenker

Thanks a lot but in the line:
Set DTPicker1 =
Ol reports an Syntax error
what shall i do??

help please
 
S

Sue Mosher [MVP-Outlook]

Are you working on an Outlook form? What's the name of the page where the
control resides?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

In that case, you need to replace myPage in the code below with Allgemein

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
E

E.Zenker

So
What i have now is:

Function Item_Open()



Set DTPicker1 =

Item.GetInspector.ModifiedFormPages("Allgemein").Controls("DTPicker1")

DTPicker1.Height = 340

DTPicker1.Width = 400



Set DTPicker2 =

Item.GetInspector.ModifiedFormPages("Allgemein").Controls("DTPicker2")

DTPicker2.Height = 340

DTPicker2.Width = 400



End Function


I put in the form a second DTPicker control to see what the code is doing to
the size.
Still got error in line 3 saying "syntax error in line 3".
Line 3 is: Set DTPicker1 =
Switching off line 3 make no changes to control field.

Maybe you can help further on.
Thank you
E.Zenker
 
S

Sue Mosher [MVP-Outlook]

I can't figure out what's wrong, but if it were my code, I'd get one object
at a time:

Set objInsp = Item.GetInspector
Set objPage = objInsp.ModifiedFormPages("Allgemein")
Set DTPicker1 = objPage.Controls("DTPicker1")

That should quickly reveal the source of the problem.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
E

E.Zenker

I Tried the code ->The error is gone but the controll does not change size.
Maybe there is something wrong in the form itsself

I got another idea, in fact i want only to remove the DTP1 from the form (
but cannot find it) Ist there a possibillity to delete the DTP1 with code.

del DTP1 or somethin else
that is used only to delet the control from the form ???

Thanks alot for your help.
E.Zenker.
 
S

Sue Mosher [MVP-Outlook]

Is any other code in the Item_Open event running?

Can't you just delete the control in design mode?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
E

E.Zenker

In the fact I am not using the DateTimePicker Control but it must be
somewhere in the form, but I cannot find it.
If I put in the form another DTP Control in the activationlist it is
shown as DTP2 but there is no DTP1.
in designmode i removed all flds but i cannot see the dtp1 to delette is.

maybee you cann please tell my some code to remove all dtp controls (maybee
the name is not DTPicker1 ) from the form.

thanks allot
E.Zenker
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top