TVReplay99
Registered User.
- Local time
- Today, 22:24
- Joined
- Jan 2, 2002
- Messages
- 29
Good Day to all that read.
I have a transaction sub form and use a combo box to select the item and to populate the UnitPrice field. I have tried to use the 3rd column to open another form if it ="34-15"
My code:
Private Sub StockNo_AfterUpdate()
On Error GoTo Err_StockNo_AfterUpdate
Me.TransUnitPrice = Me.StockNo.Column(2)
If Me.StockNo.Column(3) = "34-15" Then
DoCmd.OpenForm "frmHazTrak"
Else
DoCmd.GoToControl "Quantity"
End If
Exit_StockNo_AfterUpdate:
Exit Sub
Err_StockNo_AfterUpdate:
MsgBox Err.Description
Resume Exit_StockNo_AfterUpdate
Nothing happens other than Control goes to Quantity. So to that end I conclude that my If..Then..Else Statement is incorrect. I have tried to write it many different ways but this is the only one that doesn't return an error message.
What the code is to check for is, if the item is a chemical open a form to enter Bottle Number and Room Location. The works but I can't get the users to it.
Any guidance is appricated,
Brian
I have a transaction sub form and use a combo box to select the item and to populate the UnitPrice field. I have tried to use the 3rd column to open another form if it ="34-15"
My code:
Private Sub StockNo_AfterUpdate()
On Error GoTo Err_StockNo_AfterUpdate
Me.TransUnitPrice = Me.StockNo.Column(2)
If Me.StockNo.Column(3) = "34-15" Then
DoCmd.OpenForm "frmHazTrak"
Else
DoCmd.GoToControl "Quantity"
End If
Exit_StockNo_AfterUpdate:
Exit Sub
Err_StockNo_AfterUpdate:
MsgBox Err.Description
Resume Exit_StockNo_AfterUpdate
Nothing happens other than Control goes to Quantity. So to that end I conclude that my If..Then..Else Statement is incorrect. I have tried to write it many different ways but this is the only one that doesn't return an error message.
What the code is to check for is, if the item is a chemical open a form to enter Bottle Number and Room Location. The works but I can't get the users to it.
Any guidance is appricated,
Brian