locked
How to reference choice list values RRS feed

  • Question

  • Creating a basic lightswitch app and need to  reference the users selection from a choice list.

    really know nothing about vb and get errors, see asterisks

    Private Sub LieuHoursTotal_Compute(ByRef result As String)
                ' Set result to the desired field value
                 If Me.Lieuhours Is Nothing Then
    
                    messagebox.show("Lieuhours must have a value")                *messagbox not declared
                Else
    
                    If Me.LieuType = "Add" Then
                        Me.LieuHoursTotal = Me.LieuHoursTotal + Me.Lieuhours      *property lieuHoursTotal is read only
    
                    Else
                        Me.LieuHoursTotal = Me.LieuHoursTotal - Me.Lieuhours       *property lieuHoursTotal is read only
                    End If
                End If
            End Sub
    

    • Moved by Reed KimbleMVP Thursday, February 12, 2015 11:07 PM LightSwitch posted to VB General
    Thursday, February 12, 2015 10:48 PM

All replies

  • You've posted to the VB.Net forum which is for Windows Forms applications and service and general Visual Basic topics.  Since this is LightSwitch it is outside of our bailiwick (the first error about the messagebox shouldn't appear in windows forms).  I'm going to move this to the LightSwitch forum were you should be able to get more appropriate help.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Thursday, February 12, 2015 11:07 PM
  • Ok this a small lightswitch app

    that stores lieu time there is a table called Lieu in which the users Lieu time is recorded.

    LieuHoursTotal is a computed field which is where my code will go.





    • Edited by ghw123 Friday, February 13, 2015 12:26 AM
    Thursday, February 12, 2015 11:08 PM
  • The second table is user with a one to many link to Lieutime.

    Friday, February 13, 2015 12:25 AM