Hi all, I have an Issue with autonumber being generated before I have accepted the input from other fields. when cancelled I loose a autonumber. So I have decided to use a separate table just for order initializing and when accepted it would populate to orders table to generate the auto number. doing so I have both subforms loaded on top of each other, the main form displays when I open the form but when I click new, the main form must be hidden then display the secondary form must be displayed. below is my code but not doing as require, sure my coding is all wrong. Please could you assist?
Private Sub NewOrder_Click()
If PurchaseOrderSubForm.Visible
Me.PurchaseOrderSubFormNew.Visible = True
Me.PurchaseOrderSubForm.Visible = False
Me.PurchaseOrderSubFormNew.SetFocus
Else
Me.PurchaseOrderSubFormNew.Visible = False
Me.PurchaseOrderSubForm.Visible = True
End If
End Sub
End Sub
Private Sub NewOrder_Click()
If PurchaseOrderSubForm.Visible
Me.PurchaseOrderSubFormNew.Visible = True
Me.PurchaseOrderSubForm.Visible = False
Me.PurchaseOrderSubFormNew.SetFocus
Else
Me.PurchaseOrderSubFormNew.Visible = False
Me.PurchaseOrderSubForm.Visible = True
End If
End Sub
End Sub