Problem bringing integer into textbox

T

T. Burr

I am trying to use the VB code below.

Dim QuantityInteg As Long
Dim AddSubInteg As Long
Dim TotalInteg As String
If Forms![TE Parts].[Frame55] = 1 Then
TotalInteg = QuantityInteg - AddSubInteg
Me.Quantity.Value = (TotalInteg)
ElseIf Forms![TE Parts].[Frame55] = 2 Then
Me.Quantity = [Forms]![TE Parts]![TE Part Availability]![Quantity] +
Forms![TE Parts].[AddSub]
Else
MsgBox "Error With Automatic Quantity Change", vbRetryCancel, Error
End If

I am using two forms. One shows the availability of parts and has an
textbox to enter an quantity in and a option box to show whether you are
taking parts or adding parts to the bin. Then when you open the next form it
will show the new quantity of parts but it will not be saved yet so you can
still change it if you need to. Plus there will be a couple of other boxes
that you can change such as the location. For some reason the VB is doing
the math right but it will not put the new value into the Quantity box on the
second form. Can someone please tell me where I'm going wrong here?
 
Top