Setting Status in Outlook Task from Access Form

GeminiG

New Member
Joined
Feb 22, 2016
Messages
13
Hi All,
I have a form that assigns a task in outlook. I have all the code working correctly but I need to set the status based on the combo box selection. What I want to do is something like
Code:
[FONT=Calibri].Status = if Me.Status = "Not Started" Then "0" else if Me.Status = "In Progress" Then "1" end if[/FONT]
in the "With outlookTask" portion of my code that runs when the forms button is clicked. The code above is incorrect I'm guessing I can't do an if statement in that portion. Any ideas?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Sound right. I'd Dim a variable for status (Dim strStatus As String) at the beginning and use

Code:
If Me.Status = "Not Started" Then  
  strStatus = "0" 
Else 
  strStatus = "1" 
End if

This assumes:
1 and 0 are string values, not numbers. If they are numbers, you have a looming data type error.
There are only two choices in the combo thus you don't need "else if Me.Status = "In Progress" Then"

In the With block...
.Status = strStatus
 
Upvote 0

Forum statistics

Threads
1,221,805
Messages
6,162,081
Members
451,738
Latest member
gaseremad

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