Vacation Request Form

B

bigbrorpi

I'm trying to get Sue Mosher's Vacation form working, and had posted in
the past and was unable to complete the project.
I have changed the folder names to reflect mine, and have published the
form to the Org. Forms Lib. w/o the "save definitions" box checked. I'm
running under Outlook 2002.
In my main code as shown below, I get a permission denied error when I
try to set the Folder property of objCtrl. I've checked, and
GetCalFolder returns correctly in a msgbox. I'm sure I'm missing
something simple here, but I just can't get past this. Any help would
be appreciated!!

Thanks!

Function Item_Open()
Dim objPage
Dim objCtrl
Dim objRecip
Dim strManager
Dim strFolderPath

InitOpts

Set objPage = Item.GetInspector.ModifiedFormPages("Vacations")
Set objCtrl = objPage.Controls("OVCtl1")
If Item.Size = 0 Then
' show user Calendar in view control
With objCtrl
.Folder = GetCalFolder()
.View = "Events"
.Restriction = "[Subject] = ""Vacation"""
End With

' try to get the name of my manager
strManager = GetMyManagerName()
If strManager <> vbNullString Then
Set objRecip = Item.Recipients.Add(strManager)
objRecip.Resolve
If objRecip.Resolved Then
Set objPage =
Item.GetInspector.ModifiedFormPages("Message")
Set objCtrl = objPage.Controls("txtVacStart")
objCtrl.SetFocus
End IF
End If
Else
With objCtrl
' show public Vacations folder in view control
.Folder = "\" & Replace(mstrVacFolder,"/","\")
.View = "Vacation Month" ' name of custom view
End With
End If

Set objPage = Nothing
Set objCtrl = Nothing
Set objRecip = Nothing
End Function
 
B

bigbrorpi

An update for this issue...
I've found that it's somehow related to my username. Any other user can
open the form. I cannot, even when logged on to a machine where it
works for another user.
Hopefully this will help in troubleshooting.

Thanks.
 

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