0

# In Out Button

Ш need to create a table where the in/Out of goods will be marked. Access to the table will be closed and the record can be done through the button. There will be two In and Out

formula for In button:
let x := dialog("CASH IN", "add new record?", ["No", "Yes"]);
if x = "Yes" then
let d := Date;
let xCurrRec := Id;
let xNewGoods1 := Goods1;
let xNewGoods2 := Goods2;
let i := (create 'Goods');
i.(Goods1 := xNewGoods1);
i.(Goods2 := xNewGoods2);
i.Goods3 := xNewGoods3);

What is the formula for the button OUT if it should make all entries with a minus sign?

Thanks in advance to anyone who can help

## 5replies

• Fred
• 1 yr ago
• Reported - view

When you say "a minus sign" do you actually want to put "-" in a field? What is the field name you need to change and what kind of field is it?

• ekalcasino777
• 1 yr ago
• Reported - view

Fred Earlier, I had two tables, one when they received the goods, and the second when they took them away. But now I want everything in one table. For example, 10 chairs were delivered to the warehouse. and then took three. The first button makes plus 10 chairs and the second 3 chairs minus.
the field where the number of chairs is written is one. One button writes the product as a receipt at the warehouse, and the second one of the same field should write what was taken.
the first button gives the digit a prefix "+" and the second one should give the prefix "-",

• Ninox partner
• RoSoft_Steven.1
• 1 yr ago
• Reported - view

You can make the number negative by multiplying it by -1

*-1
• Fred
• 1 yr ago
• Reported - view
ekalcasino777 said:
the first button gives the digit a prefix "+" and the second one should give the prefix "-",

once you add a prefix then the numbers become text. Don't you want to keep the numbers as numbers?

• Alan_Cooke
• 1 yr ago
• Reported - view

I would be inclined to have two fields GoodsIn and GoodsOut - both number fields.  The balance available would be In - Out.  Way back when I built an Access Inventory DB I was told never have a field for the inStock Qty - it's always a calculation.  Using the above method you are able to total ALL ins and All outs and so much more.

Whether you receive stock or sells stock they are both a positive number.  It's the difference that provides the balance

## Content aside

• 1 yr agoLast active
• 5Replies
• 54Views
• 5 Following