Cannot Reference controls On A Custom Form

D

David M.

BOY IS THIS FRUSTRATING!

I created an Outlook 2000 User Request custom form which
includes combo boxes.

When the form opens it retrieves info from Access DB
tables and attempts to fill the PossibleValues property of
several combo boxes.

I am using the following code:

Set FormPage = Item.GetInspector.ModifiedFormPages
("NewForm") [This seems to work OK]

Set ControlX = FormPage.Controls("cboRequester")
[The code stops here and quits running the VBScript.]

All the referece sources I've found provide the above
sample code.

I am running Outlook 2000 on Windows 2000 as a (non-ADMIN
user)

Does anyone know why this doesn't work???

Thank you.
 
H

Hollis D. Paul

G

Guest

Hollis,

Thank you for the suggestion.

I tried the same code at home, on a Windows XP machine,
and it works fine. There must be something with
Windows 2000 that is awry.

David M.
-----Original Message-----
Set ControlX = FormPage.Controls("cboRequester")
Check the help file, but I thought you had to use the following syntax:

Set ControlX = FormPage.Controls.Find("cboRequester")

After that, go to www.slipstick.com and look for an example using
comboboxes.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp? FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA


.
 
H

Hollis D. Paul

I tried the same code at home, on a Windows XP machine,
and it works fine. There must be something with
Windows 2000 that is awry.
The belief that Outlook is Outlook is Outlook, and Outlook by any other
name, such as Outlook Express, smells just as sweet, is quite false.
Each version of Outlook, be it Outlook 95, 98, 2000, XP or 2002, or
2003, has its own, unique OOM, with lots of changes from one OOM to the
next. There is no guarantee that any script will be backward
compatible, and there are many cases where you have to include tests to
determine which version of Outlook is running the code. It is as true
for you as it is for Ken Slovak.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA
 

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