Task Priority Level Via COmbo Box

ddecker3

New Member
Joined
Jun 15, 2008
Messages
6
I am trying to use a form to set priority level for a task.
I cant get it to convert over from High/Low/Medium to the correct olImportanceHigh, olImportanceLow, ect to use in the .Importance part of the (olTaskItem)

I thought I could use IF/THEN in the Afterupdate but dont know how to make the variable global in the database, and then use that variable in the TASK command box.


Hopefully that makes sense.

ANy questions please email me @ x f a i t h @ g mail.com

Thanks

David
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi David

I'm not sure what you mean by : "I {snip} dont know how to make the variable global in the database, and then use that variable in the TASK command box."

For a global variable for the database, create a new table with the one field to hold that value. Is that the sort of thing you want?

What is the 'TASK command box'? Is that an unbound control on a form?

Andrew
 
Upvote 0
Ok.

I have a table called priority with : High/Normal/Low

each should = High = olImportanceHigh
Normal = olImportanceNormal
Low = olImportanceLow

Right now they are just associated as High/Normal/Low. I want when the user selects the Priority Level it will put the right info after the .importance = for

Obj.task
.Body =
.Subjecy =
.importance =

I know you can use a string for body and subject unsure if you can use a string variable for importance, have not tried to call 0/1/2 either yet. Does this make any more sense.
There is a command button that when clicked on will send me a task to a public folder, and I want it to also state the priority of that task based upon the input selected.

Thanks
X
 
Upvote 0
Are you in Access or Outlook.
I think you might be attemping to set a flag value for the outlook property when creating an e-mail from Access.
 
Upvote 0
I am using access to send an email(task) from outlook to a public folder.

hope that helps.

But that sounds about right setting a flag.

X
 
Upvote 0
from msdn.microsoft.com/en-us/library/aa171432(office.11).aspx
<TABLE class=dtTABLE border=0><TBODY><TR><TD>OlImportance can be one of these OlImportance constants.</TD></TR><TR><TD>olImportanceHigh</TD></TR><TR><TD>olImportanceLow</TD></TR><TR><TD>olImportanceNormal

Assuming that your Access form has a radio box for the three importance levles, you can assigned the .importance value accordingly.

Sub Mailer()
'better version
Dim objol As New Outlook.Application
Dim objmail As MailItem
Set objol = New Outlook.Application
Set objmail = objol.CreateItem(olMailItem)
With objmail
.To = "someone1@somewhere.com
"
.CC = "someone2@somewhere.com
"
.Subject = "TEST EMAIL INTERFACE-Mailer"
.SentOnBehalfOfName = "Server Auto Notification
"
.Importance = olImportanceLow
.Body = "THIS IS THE BODY "
.NoAging = True
.Attachments.Add ("drive:\something.doc")
.Display
End With
Set objmail = Nothing
Set objol = Nothing
SendKeys "%{s}", True

End Sub



HIH
</TD></TR></TBODY></TABLE>
 
Upvote 0
That might work but I was trying to use a combo box for priority level, with a command box to finalize all entries into an email and task.

I get an error like "Cant coerce variable", I dont have access installed currrently on this machine. So I cant test all the way.


X
 
Upvote 0
For whatever reason, I could not get "olImportanceHigh, olImportanceNormal, olImportanceLow" to work in this format:

[does not work for me].importance = olImportanceHigh [/does not work for me]

it would always default to low importance regardless of value.

What DID work, was this:

.importance = 0 'where 0 = low
.importance = 1 'where 1 = normal
.importance = 2 'where 2 = high

Hopfully, this comes in handy for someone.

As a reference, I'm using office 2007 - completely updated.
 
Upvote 0

Forum statistics

Threads
1,214,405
Messages
6,119,323
Members
448,887
Latest member
AirOliver

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top