Hello i have a Button that Updates quanity on another table the Form that this is on is its Subform.
Im having trouble setting my Currentvalue should i use another method besides DLookup sence i have the tables linked by Part Name? still kinda new to this HELP! what is wrong here?
Im having trouble setting my Currentvalue should i use another method besides DLookup sence i have the tables linked by Part Name? still kinda new to this HELP! what is wrong here?
Code:
Private Sub Command15_Click()
Dim HowMeny
Dim CurrentValue
HowMeny = Me.How_Meny_.Value
CurrentValue = DLookup("[Total Ammount]", "[Parts Inventory]", "[Part Name] = '" & Me.Part_Name & "'")
If Me.Adding_Or_Subtracting_ = "Adding" Then
CurrentValue = HowMeny + CurrentValue
Else
End If
If Me.Adding_Or_Subtracting_ = "Subtracting" Then
CurrentValue = CurrentValue - HowMeny
Else
End If
If Me.Adding_Or_Subtracting_ = "Balancing" Then
CurrentValue = HowMeny
Else
End If
DoCmd.GoToRecord , , acNewRec
End Sub