Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Access expression builder help

  • 23-11-2011 5:54pm
    #1
    Closed Accounts Posts: 47


    hope someone can help. Doing my first access project and stuck on an an expression
    This is for a workshop repair database. I have a field that is restrited to 3 choices, saw-drill-grinder. I have another field that I enter the minutes it took to repair the item. Each item has a different repair cost per minute.

    I want to build an expression to say the follow

    If item=saw them “minutes” * £15 or If item=drill them “minutes” * £10 or If item=grinder them “minutes” * £20


    thanks for the help


Comments

  • Registered Users, Registered Users 2 Posts: 230 ✭✭bellylint


    Hiya, I cant recall how to use the expression builder, its been years since I was an access dev but if you would arent against putting it in as an event procedure this might help.

    If you have three fields on your form. One is a combo box called Tool, it has the items of saw drill and grinder in it, the second is text box called Minutes and the third is a text box called cost.

    if you go to the properties of the minutes text box and go to the events section, double click on the "after update" event and insert the following code


    If Me.Tool = "saw" Then
    Me.Cost = Me.Minutes * 10
    ElseIf Me.Tool = "drill" Then
    Me.Cost = Me.Minutes * 15
    Else: Me.Cost = Me.Minutes * 20
    End If

    It should work.

    good luck.


Advertisement