Could someone tell me how to link a spin button to a field, so a number in a table is incremented?

I have a form in LO Base & want to add two spin buttons to update a record by one, depending on whether I win or lose against a particular game opponent. I put the buttons on a form, but can’t see how to link them to the “Won” or "Lost’ field.
Any help would be appreciated.
Details: LibreOffice Base. Latest. Windows 10

There is a related question and answer at How to set spin button increment on time field?

The spin button is not meant to be used on its’ own. What you are most likely looking for is already in the control or table column you are looking to increment. Of course this should be a numeric field control of some type. Go to the General properties of the control/table column and look for Spin Button property. Change from No to Yes. You can also set the increment/decrement value on that same form.

Thanks Ratslinger - but I can’t see any Spin Button Yes/No property on either the control or the column in the table. On the spin button control is an option to change the increment/decrement value - but nowhere does it allow to link to a field in the table. If I open the table in edit mode & select the Won field (the one i want to increment) I can’t see a Spin Button property. I’m using small integer, but have tried all the other numeric values. Am I missing something?

You are not to be looking at the table but at the control on the form.

If you are dealing with a table grid control, the columns are controls in themselves, otherwise you are dealing with individual controls. Either the column control or the individual control should be of type: Numeric Field, Formatted Field or Currency. Of those, probably a Numeric Field type is best. Those are the control types which have the spin button options. Get rid of your original Spin Button control.

Also, if the existing control is not of the proper type, there is no need to delete it. Just right click and select Replace with and select the appropriate control.

Adding the Numeric Field and making that field have a spin button is fine.

But if you have to calculate anything based on what’s within that field–a numeric value for example–I have found that it’s difficult to do that. If you need the “won” or “lost” field to be just a cell (with no form field within it) then you can add a Spin Button to an adjacent cell by using the Form Controls banner and clicking on the Spin Button clicking and dragging the area where you want the button to appear. To link the Spin Button to the “won” or “lost” cell you right click on the button and go to Control Properties, click the Data tab and enter the cell name of the cell you want to link the button to. Make sure to click out of the design mode so you can use the button. And that’s pretty much it.

If this is incorrect someone please do post a correction to make it accurate as I’m still learning too. Thanks and good luck.

@KPS2019,

Thank you for posting. Always welcome.

What it appears you have missed in the question is that this deals with LO Base and a database table. It seems you are talking of a solution in Calc as you reference ‘cells’.

Ah. Thank you. I stand corrected. It just goes to show that when you’re searching for a solution to a specific problem, all other things you see are cast in that light. I was searching for a Spin Button solution for cells in a table so that’s what I saw and I did indeed miss the portion of the question involving Base.

Thank you for making the correction, Ratslinger.