rekabeilla
New member
- Local time
- Today, 02:05
- Joined
- Apr 18, 2020
- Messages
- 17
Hi,
I have a navigation form (that i coded, not the built in navigation form) that i placed an unbound subform on. On click in the menu changes the control source of the subform to display that specific page. I don't want the user to navigate away from the current page without saving so on the on click event for the menu buttons, i want to check to see if the subform is loaded and if it is I want to check to see if a checkbox is true. That's where i hit a wall. The first line runs through so it knows the subform is loaded to that page, BUT I think I have the syntax wrong referring to the control source. This is what I have:
Code breaks on line 2, so how should this be coded?
Thank you!
I have a navigation form (that i coded, not the built in navigation form) that i placed an unbound subform on. On click in the menu changes the control source of the subform to display that specific page. I don't want the user to navigate away from the current page without saving so on the on click event for the menu buttons, i want to check to see if the subform is loaded and if it is I want to check to see if a checkbox is true. That's where i hit a wall. The first line runs through so it knows the subform is loaded to that page, BUT I think I have the syntax wrong referring to the control source. This is what I have:
Code:
If Me.NavSubForm.SourceObject = "tbl_Clinic Entry" Then
If [Forms]![tbl_Clinic Entry].Controls!Check245 = False Then
If 'do something'
Else 'do something else'
End If
End If
End If
Code breaks on line 2, so how should this be coded?
Thank you!