This topic is locked

Change value of field in a lookup depending on data selected.

4/18/2011 8:02:04 AM
ASPRunnerPro General questions
P
paulstone author

Heres another one!!
Table 1 Name - Assets - Fields.. [Asset Name] [Asset Status]

[Asset Status] is a lookup with a list of values ... eg - In Use, Ready for use, removed, etc
Table 2 Name - Equipment - Fields.. [Asset to Use]

This Field looks up Assets Table and displays the [Asset Name] and [Asset Status]

It is also filtered with where expression to display only records with status of 'Ready for Use'
My Question is...once a value is selected and stored in Table 2 I would like the [Asset Status] of the selected record to change value from

'Ready for use' to 'in use' making this asset unavailable for selection in future queries.
Thanks for your help! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=16849&image=1&table=forumtopics' class='bbc_emoticon' alt=':unsure:' />
Regards.
Paul.
AspRunner Pro 6.3

Sergey Kornilov admin 4/18/2011

This is something you can do using events like BeforeAdd/BeforeEdit. Here is the sample code:

values("Asset status")="in use"