Link to home
Start Free TrialLog in
Avatar of ShadowIT
ShadowITFlag for United States of America

asked on

Access 2010 EditRecord Macro

Hello Experts,

I am having a heck of a time trying to get an edit record macro to change a yes/no to false. Currently have some logic that will allow a record to be editable if the yes/no is set to true by the user.  Once this is completed if the status is either 4 or 15 I want the yes/no to be set to false using an After Update macro I have attached.  But no matter how I try to accomplish this I cannot seem to get this to work.

I should also mention this is an Access 2010 Web Database, so I cannot use either VBA nor an update query, it must be a marco.

Thank you
AfterUpdateMacro.jpg
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Think you want an "AND" on that If check, not an OR.

Jim.
Or better yet, If I'm understanding correctly,
 
=4 or =15

Jim.
Avatar of ShadowIT

ASKER

Yes, this was a typo, it should read "Once this is completed if the status is neither 4 or 15 I want the yes/no to be set to false using an After Update macro I have attached." so <> is correct.

I will make the Or to And change but I have tried these both and it didn't seem to matter.  I have also tried it with just a single value such as Status <> 4 and it still didn't work either.

I have also changed the macro's syntax to work in Before Change to see if that would work and no luck...this is quite madding.
Well certainly should be AND then, but as far as editing the record right at that point, not sure you can.  Seems like you should just be setting the field.

Can't say for sure though because I haven't done a single web database yet.

Sorry to leave you hanging, but if no one else drops in, I'll get some other eyes on this.

Jim.
Does this absolutely have to be a web database?

There are *many* things (that are quite easily done in a standard DB) that are extremely difficult to do in a web database. (if do-able at all...)
(There are lots of questions here on everything from simple "SetValue" questions to the use of Tempvars..., to If/Then/Else syntax)

Web database are a relatively new technology, and it is not clear if there is any real wide adaption or acceptance of this technology...

If you just need your db to be accessible on the web you can simply leave it as-is and just use something like this:
http://eqldata.com/

Just my 2c, but the macro language is only really applicable for MS Access.
You will have to invest a fair amount of resources to learn how to do even the simplest automation.
Even then, ...you cannot port this expertise to any other "web technology" (not even in the MS world)
.net, Dreamweaver, HTML, ASP, XML, PHP, ...etc

May developers simply bite the bullet and go with a dedicated web development platform.
(just in case MS abruptly "drops" support for this technology, see: Access Data Pages, User Level security, ..et al)


JeffCoachman
I am not saying that an Expert here won't be able to help you out here...

Only that as your "web" database matures, you will be forever running up against issues like this...

JeffCoachman
It's deployed as a production instance...yes this absolutely must be a web database.
I'll see if I can find someone that's worked with web databases....

Jim.
If it turns out that you need to use the "SetValue" macro action, ...AFAICT, this is not available in a web database.
You may have to end up using either SetTempVar or SetLocalVar...
ASKER CERTIFIED SOLUTION
Avatar of ShadowIT
ShadowIT
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
<Also, regarding Access Services within SharePoint 2010, I don't think characterizing it as new technology is accurate...it is over two years old. >
Fair enough...
I may have blurred the distinction between "New" and "Brand New"
;-)

By new, ...I meant in terms of mainstream adaptation.

In any event I am glad you got it working on your own,
Thank you for posting your solution so that others may benefit from this thread.

;-)

JeffCoachman
Figiured it out myself...