@Rabbit
Ok, I take your point. Here is what I have done but can't get it to function properly. I didn't quite know how to set a record as active (given this function wont be all performed at once so the focus on an active person will move, the form will be closed but next time you open the form I want it to be the same active person it was prior to being closed).
Trying to think outside the box a little to try and get it to work as there is only 2 people on my list but needing it to alternate between them every time the form is opened.
I know this is not really what you meant but I wasn't sure where to start. I need to make this function improrovement asap as it's currently skewing my results having only one person review each result.
I'm happy to take on board any feedback -please guide me though as I'm not a natural coder but learn very quickly once guided through
- Private Sub Command0_Click()
-
-
activePersonEmail = DLookup("Email", "QAEmailforBenForm", "Active = True")
-
-
Dim ol As Object
-
Dim itm As Object
-
Set ol = CreateObject("Outlook.Application")
-
Set itm = ol.CreateItem(0)
-
itm.To = activePersonEmail
-
itm.Subject = "Test"
-
itm.Body = "This is a test no action required."
-
-
itm.Display
-
Set itm = Nothing
-
Set ol = Nothing
-
-
Dim sql As String
-
ssql = "UPDATE [QAEmailforBenForm] SET [Active]=False WHERE [Active]=True"
-
ssql = "UPDATE [QAEmailforBenForm] SET [Active]=True WHERE [Active]=False"
-
DoCmd.RunSQL ssql
-
-
End Sub
I can get it to email to the current selected person but not able to change the check box indicating that person is active (it will check one but not uncheck the other one concurrently).