Link to home
Start Free TrialLog in
Avatar of Arthit84
Arthit84Flag for Sweden

asked on

An update macro for Microsoft Access

Hi, Experts

I have been trying to create a macro to update a colum for sometime now but i wont work :(

Here is what i want to do.

i have a field call Deliverystatus with two choice "Not delivered" and "delivered"
I have another field call Delivered date

I want to create a macro so that when someone change Deliverytstatus to "delivered"
The Delivered Date gets populate but the todays date.

Please some point me into right direction :D

Thanks in advance
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Access is limited and do not have the trigger feature built-in, hence we can't execute a DML command by detecting update of a field.

>>I want to create a macro so that when someone change Deliverytstatus to "delivered"
The Delivered Date gets populate but the todays date.
we need to know how the end user update the DeliveryStatus? if it's via a Form, we need to execute an update sql statement after the change is completed.
Avatar of Arthit84

ASKER

Thansk for answering Ryan

yes it is via Form

i am not an expert in access so please tell me a little about the update SQL statement
SOLUTION
Avatar of Eric Sherman
Eric Sherman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks experts i will test this later tonite.
Avatar of crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access

you're welcome :)

Now() gives you date and time.  If you only want date, use
Date()

Open in new window

... and change the reference to Me.Delivered_Date (says Me.Delivery_Date)
any of the experts that have worked with access Web app in sharepoint?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the links i watched the video its really great and fun to know that Access is very powerful.
I have not have the time to test it, i will test and report back.
Best regards
you're welcome ~ glad you like it
poster said he would come back but didn't ... guess he is busy working on his app!
Hello i apologize that i have not been online, i though that i already close this thread at sepetember i quess i must have done something wrong.
The app is working great and i am really learn alot from the website from the video.
Now i am taking some course in Lynda and CBTnuggets on Access :D

Thanks you again and sorry that i missed this thread