I'm trying to add two random numbers together on a form in ms access and with the click of a calculate button, the result will appear in a blank field. But when I click on the calculate button there is no result in the empty label field. This is the code I wrote.(Below) Any suggestions as to why the result isn't showing on the blank label box(field)? Is my code correct? Any solutions to resolve this would be more than welcome.


Private Sub Command1_Click()

'To add the values in text box 1 and text box 2

Sum = Val(Text1.Text) + Val(Text2.Text)

'To display the answer on label 1

Label101.Caption = Sum

End Sub