Solved Problem with changing values in access (1 Viewer)

nickrider88

New member
Local time
Today, 09:17
Joined
Nov 6, 2023
Messages
7
Hello friends,

I have a problem with access, the program is based on invoicing goods.
When I enter all the parameters, the customer's name, the product, the quantity, I start to change the price of the item and it gives me an error
Error: Control can't be edited; it's bound to the expression '[Quantity]*[Price]'.

Code: Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

If Not IsNull(Forms!InvoiceF1!Total) Then
Amount. Requery
Forms!InvoiceF1!Amount = Forms!InvoiceF1!Total
End If

End Sat
 

CJ_London

Super Moderator
Staff member
Local time
Today, 08:17
Joined
Feb 19, 2013
Messages
16,612
you cannot edit a calculated expression

looks like it is this line that is causing the problem

Code:
Forms!InvoiceF1!Amount = Forms!InvoiceF1!Total

Would have thought total was the sum of amounts? So why try to assign the total value to amount?

For the future, please use the code tags - copy/paste your code to the post, highlight it and click the </> button
 

nickrider88

New member
Local time
Today, 09:17
Joined
Nov 6, 2023
Messages
7
Now I checked, the table for the initial price was hidden, I don't know for what reason.. I didn't realize that I was changing the final price until you wrote it.. Thank you for sure ;)

As for the code, I'm new to the forum, but in the future we'll use the rule :)
 

Gasman

Enthusiastic Amateur
Local time
Today, 08:17
Joined
Sep 21, 2011
Messages
14,299
Applies to most forums where code is involved.
 

Users who are viewing this thread

Top Bottom