Need Help in DataMacros... Especially with LookupRecord?

mardi 5 mai 2015

Hi all. I am Prabhakaran Karuppaih - A VBA Developer doing Ms-Access and Excel Development for more than 6 years. But the physical macros (The Macros available in the Navigation pane) are an untouched subject to me till now. Yesterday when I wanted to do a Validation for a table I stumbled upon a new concept called DataMacros. There is no problem in understanding in what is that and what it does and all, but the syntax are the one little I'm confused of:

Let me tell my current requirements,

I have a Log Table having fields like Logging_Time and Logging Resource and all

and an another table called

Roles where are there 3 roles: Regular User, Admin, Super Admin.

A Regular User can enter Logs for only for the current date

but an Admin can enter Logs for upto 2 days in past (for other users too)

Finally a Super Admin can do anything.

The problem is currently the validation Rules are not alllowing to lookup the Roles Table Matching the Resource_ID, Resource_Role to get the Role_id from the Roles Table.

As I want to give only a table level validation, I know I have to use the Data Macros especially the Before_Change.

Kindly help me on How to get the Role_id from the Roles table using the LookupRecord and based on the Role_id I want to some different validations for Different Roles. All I want to do with the Data Macros only. Kindly help.
Need Help in DataMacros... Especially with LookupRecord?

0 commentaires:

Enregistrer un commentaire

Labels