I have been getting this error:
"object doesn't support this object or method."
The debug is saying the problem is in the series of if statements based on which product I enter in the "drpProduct " control on the form. (Lines 26-48)
Any kind of help would be greatly appreciated.
"object doesn't support this object or method."
The debug is saying the problem is in the series of if statements based on which product I enter in the "drpProduct " control on the form. (Lines 26-48)
Code:
Private Sub btnSave_Click() 'Automatically sets the Location of the transaction to SSP. -AJB 4/13/11 Me.txtLocation = "SCP" 'Makes sure a password is entered. -AJB 4/12/11 If IsNull(Me.txtPassword) Or Me.txtPassword = "" Then MsgBox "You must enter an authorization password.", vbOKOnly, "Invalid Entry" Me.txtPassword.SetFocus Exit Sub End If 'Redirects an incorrect password -JLJ 4/12/11 If Me.txtPassword <> Me.txtPasswordLookup Then MsgBox "You have entered an invalid EID/password.", vbOKOnly, "Invalid Entry" Me.txtPassword.SetFocus Exit Sub End If 'If the transaction is Outbound, the stock adjustment number gets a negative sign added to the front of it. -AJB 4/12/11 If Me.drpIn_Out = "Outbound" Then Me.txtStockAdjust = "-" & Me.txtStockAdjust End If 'Sets the stockID of the current transaction. -AJB 4/13/11 If Me.drpProduct = "Sleeved DVDs" Then Me.txtStockNum = 1 End If If Me.drpProduct = "Cased DVDs" Then Me.txtStockNum = 2 End If If Me.drpProduct = "6x9 Envelopes" Then Me.txtStockNum = 3 End If If Me.drpProduct = "Booklets" Then Me.txtStockNum = 4 End If If Me.drpProduct = "Letters" Then Me.txtStockNum = 5 End If If Me.drpProduct = "Bibles" Then Me.txtStockNum = 6 End If 'Makes sure all of the controls are filled. -AJB 4/12/11 If Me.drpIn_Out = "" Or Me.txtLocation = "" Or Me.drpProduct = "" Or Me.txtStockAdjust = Null Or Me.txtPackerEID = "" Or Me.txtAuthEID = "" Or Me.txtTransDate = "" Or Me.txtStockNum = Null Then MsgBox "Make sure all fields are filled.", vbOKOnly, "Incomplete Form" Exit Sub End If 'Clears Password field. - AJB 4/15/11 Me.txtPassword = "" 'Set Saved checkbox to true which will enable user to close the form. -AJB 4/13/11 Me.chkSaved = True 'Everything was saved. -AJB 4/16/11 MsgBox "This inventory transaction was saved.", vbOKOnly, "Transaction Saved" End Sub
Comment