Access 2013 Web App - Requery Problem

mercredi 18 février 2015

Hi



I am try to requery a datasheet based on data contained in a related table. So I have two tables, Tasks and Employee. The Tasks table contains a field called 'requested by' to represent the person who requested the task. I only want to display the tasks relating to the logged in user. The 'requested by' field uses a lookup to the Employee table. I understand that the 'requested by' field in the Tasks table will not store the employee name but rather the ID for that employee in the Employee table.



To start with I created a data macro to which I pass the userdisplayname (current logged in user) which then does a lookup against the Employee table. if a match is found it returns the ID for the related employee. I then created a UI macro which calls the data macro and passes the ID to use in a requery. I then added this to the load event of the view. However every time I run it, I get a error: Invalid field name 'Task.Requested_By' and when I click on macro details I get the following:-



Macro Name:

Outstanding FE : filterByUser

Condition:



Action Name:

RequeryRecords

Arguments:

[Task].[Requested_By]=[returnedID]

Error Number:

2950



Please can you help me as this is stopping from completing my project. I need to be able to filter the tasks based on the logged in user so that user cannot amend other users tasks.



Many thanks!

Access 2013 Web App - Requery Problem

0 commentaires:

Enregistrer un commentaire

Labels