sashapixie
Registered User.
- Local time
- Today, 21:27
- Joined
- Sep 30, 2015
- Messages
- 27
Hi All
I am trying to run a message box using an If statement which is activated in a subform however the If statement is looking at a field in a separate subform, both subforms are within a main form.
The vba I have at the moment is below:
Private Sub Pick_Ship_Quantity_GotFocus()
If Me.Dirty = True Then Me.Dirty = False
If Forms![Order Entry Form]![Backlog Orders subform].Form.[Quantity] > Forms![Order Entry Form]![Backlog Orders subform].Form.[Current Stock] Then
MsgBox "You only have a low stock level of Items in your inventory", vbCritical, "Inventory Information"
End If
End Sub
Unfortunately I have been on this a while now and still cannot get it to work.
Any help is greatly appreciated.
I am trying to run a message box using an If statement which is activated in a subform however the If statement is looking at a field in a separate subform, both subforms are within a main form.
The vba I have at the moment is below:
Private Sub Pick_Ship_Quantity_GotFocus()
If Me.Dirty = True Then Me.Dirty = False
If Forms![Order Entry Form]![Backlog Orders subform].Form.[Quantity] > Forms![Order Entry Form]![Backlog Orders subform].Form.[Current Stock] Then
MsgBox "You only have a low stock level of Items in your inventory", vbCritical, "Inventory Information"
End If
End Sub
Unfortunately I have been on this a while now and still cannot get it to work.
Any help is greatly appreciated.