|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I need some help. I am working with an order form (frmProcessUnfilledOrders) which has an item detail subform. The subform contains a text control for "backordered quantity". I want to create a test with an IF THEN that if any item on the subform has the backordered control set to a value other than 0, then change the "order status" option group control value on the parent order form to "3".
I have created my IF THEN in the Changed event for the Backordered control. I realize this is probably really bad code, but here it is: Private Sub txtBackordered_Change() Dim numBOValue As Integer Dim numStatus As Integer numBOValue = txtBackordered.Value If numBOValue > 0 Then numStatus = 3 DoCmd.GoToControl (frmProcessUnfilledOrders.frameOrderStatus) frameOrderStatus.Value = numStatus End If End Sub I get no runtime error, but it does not effect the parent form control at all. Thanks for helping a beginner out of a hole! Aaron |
|
#2
|
|||
|
|||
|
I would run this in the After Update of the field on the subform.
Private Sub txtBackordered_AfterUpdate() If Me.txtBackordered > 0 Then Forms!frmProcessUnfilledOrders!frameOrderStatus= 3 End If End Sub It won't change until you move out of the Backordered field, but this works when I try it. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > If Then to change control value on Parent Form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|