Been trying for 5 hours now.
Lots of tries from things on various places.
I have database.
Table and forms.
on form is a cPoints text box set to integer
Have another text box txt_AddRemove set to integer.
Need to take the value from txt_AddRemove and add it to cPoints with the push of a button.
this is what I got.
REM ***** BASIC ***** Sub Main ( Event as Object ) rem MsgBox "You pressed Me!" DIM oForm as Object DIM oField as object DIM oPointsField as object DIM oTotalPoints as object 'gets the form oForm = Event.Source.Model.Parent oField = oForm.getByName("txt_AddRemove") ' oField.Text = "500" oPointsField = oForm.getByName("cPoints") oTotalPoints = oField + oPointsField oPointsField.Text = oTotalPoints oPointsField.commit() End Sub
first error only in debug
oForm = Event.Source.Model.Parent Argument is not optional.
when running by clicking on button
oTotalPoints = oField + oPointsField incorrect property value
tried to find convert text to int and int to text. cannot find anything.
if I can get this working I am done.
Not sure how to reply to a comment on my post
Can you not convert text to int, then add, then convert to text. Also all boxes are integers. Can I not pull the value off as an integer.
(Slighly edited by @Lupp for better readability.)