Record saving improperly (1 Viewer)

mikesp1234

Registered User.
Local time
Yesterday, 19:33
Joined
Aug 28, 2013
Messages
16
I have a form with a drop down to select ink type. Then a textbox with the quantity in it. When I change the quantity, it changes the top combobox item to whatever was selected at the time of the change. IE: If Magenta is selected, and Cyan is the top item it will change the top item to Magenta. Both the combobox and text box are linked to a table called 'canon'. Please Help. Here is my code.

Option Compare Database

Private Sub Canon_Ink_Change() 'Changes the quantity to the same record as the ink
Me!Quantity = Me![Canon Ink].Column(1)
End Sub

Private Sub increase_Click() ' increases the value of quantity by 1
Quantity.Value = Quantity.Value + 1
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.Requery
End Sub

Private Sub decrease_Click() ' decreases the value of quantity by 1

Dim quanval As Integer
Quantity.Value = Quantity.Value - 1
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
quanval = Quantity.Value
If Quantity.Value < 3 Then MsgBox ("Quantities are low. You should send a report advising the current inventory status.")
If quanval < 3 Then DoCmd.OpenForm "Reports"
Me.Requery

End Sub
 
Last edited:

Users who are viewing this thread

Top Bottom