create macro in web database

demicay2669

Registered User.
Local time
Today, 12:23
Joined
Aug 22, 2013
Messages
39
I'm tryin to create a Macro in a Web database form for my 'ControlCloseDate' date field on the AfterUpdate event to change my 'Status' field to "CLOSED".
The code below I used when I created a regular form and it worked like I wanted. How do I recreate this in a Macro?


Code:
If ControlCloseDate <> " " Then
Status = "CLOSED"
Else: Status = "Open"
End If


My database is attached it that helps.
Any help is much appreciated. Thanks
 

Attachments

Hi,

So you want this macro to run in the AfterUpdate event for the ControlCloseDate control on the form?

See the attached screenshot of the macro design window which will do this.

I think, however, this might be better in a data macro since this sounds like a data rule you want always enforced. If you only have this at the form level, users can easily bypass that logic by updating the data from any number of other entry points.

attachment.php


--------------------
Jeff Conrad - Access Junkie - MVP Alumnus
SDET II - Access Test Team - Microsoft Corporation

Author - Microsoft Access 2013 Inside Out
Author - Microsoft Access 2010 Inside Out
Co-author - Microsoft Office Access 2007 Inside Out
Access 2007/2010/2013 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.mspx
----------
 

Attachments

  • MacroScreenshot.png
    MacroScreenshot.png
    9.5 KB · Views: 259
That what almost what I wanted, I just had to reverse the "closed" and "open values. But thank you Access
 
I believe that you have to use Macro instead of VB in Access 2010 webform.
 

Users who are viewing this thread

Back
Top Bottom