J
james
Hi,
I have a database that has two tables.
1 is my customer details.
2 is wholesale price.
Table 1 has a field called IAGBP and IAGBPMargin
Table 2 has a field called IAGBP also.
I want to link Table1 so that it takes the value of IAGBP in Table 2 and
adds the IAGBPMargin and puts the resultant figure into IAGBP in Table 1.
I am using the following code but the debug stops at C. I think my code for
that is wrong.
Also the only way I know to do this is to attach it to a button. Is there a
better way to get this figure to constantly update Table1 whenever I update
my wholesale price or margin price?
Private Sub Command14_Click()
Dim A As Integer
Dim B As Integer
Dim C As Integer
A = IAGBP.Value
B = IAGBPMargin.Value
C = Table2.IAGBP.Value
IAGBP.Value = (B / 10000) + C
End Sub
I have a database that has two tables.
1 is my customer details.
2 is wholesale price.
Table 1 has a field called IAGBP and IAGBPMargin
Table 2 has a field called IAGBP also.
I want to link Table1 so that it takes the value of IAGBP in Table 2 and
adds the IAGBPMargin and puts the resultant figure into IAGBP in Table 1.
I am using the following code but the debug stops at C. I think my code for
that is wrong.
Also the only way I know to do this is to attach it to a button. Is there a
better way to get this figure to constantly update Table1 whenever I update
my wholesale price or margin price?
Private Sub Command14_Click()
Dim A As Integer
Dim B As Integer
Dim C As Integer
A = IAGBP.Value
B = IAGBPMargin.Value
C = Table2.IAGBP.Value
IAGBP.Value = (B / 10000) + C
End Sub