D
Dale DeWitt
I have a form that has a tab control (actually 10 tab
pages)... on each page I have a subform......
On the main form, I call a SQL function I wrote in SQL
2000, and set a field defined in the module I call, to
the value returned from the function.
Based on the value returned from the function, I need to
do the following:
Function SetFormStatus()
If gCoreMemberStatus = 1 Then
Me.AllowAdditions = True
Me.AllowDeletions = True
Me.AllowEdits = True
End If
If gCoreMemberStatus = 2 Then
Me.AllowAdditions = False
Me.AllowDeletions = False
Me.AllowEdits = False
End If
If gCoreMemberStatus = 3 Then
Me.AllowAdditions = False
Me.AllowDeletions = False
Me.AllowEdits = False
End If
If gCoreMemberStatus = 4 Then
Me.AllowAdditions = False
Me.AllowDeletions = False
Me.AllowEdits = False
End If
If gCoreMemberStatus = 5 Then
Me.AllowAdditions = True
Me.AllowDeletions = True
Me.AllowEdits = True
End If
End Function
The thing I am getting hung up on is the fact that
the "ME." only refers to the main form, and not the
subforms. So I thought I would just drop the code into
each subform, but the form events do not fire the way
they do on the main form. I tried to put the code in the
forms.activate event, and the eventnever fires.
So I am thinking maybe I need to loop through the
controls on the main form setting the properties that
way, and Im just getting myself more confused.....
I need to be able to reference the tab control, and the
subform control, down to the form on the subform..... all
to lock down update privilges on the forms.
I hope I am not being to confusing..... In a nutshell, I
am looking at the role the user belongs to in the SQL
Database, and passing that back to the form..... That
determines what update rights a user has on the form.
Either full rights, no update rights, or partial rights
(update only certain fields)......
Any ideas ??
pages)... on each page I have a subform......
On the main form, I call a SQL function I wrote in SQL
2000, and set a field defined in the module I call, to
the value returned from the function.
Based on the value returned from the function, I need to
do the following:
Function SetFormStatus()
If gCoreMemberStatus = 1 Then
Me.AllowAdditions = True
Me.AllowDeletions = True
Me.AllowEdits = True
End If
If gCoreMemberStatus = 2 Then
Me.AllowAdditions = False
Me.AllowDeletions = False
Me.AllowEdits = False
End If
If gCoreMemberStatus = 3 Then
Me.AllowAdditions = False
Me.AllowDeletions = False
Me.AllowEdits = False
End If
If gCoreMemberStatus = 4 Then
Me.AllowAdditions = False
Me.AllowDeletions = False
Me.AllowEdits = False
End If
If gCoreMemberStatus = 5 Then
Me.AllowAdditions = True
Me.AllowDeletions = True
Me.AllowEdits = True
End If
End Function
The thing I am getting hung up on is the fact that
the "ME." only refers to the main form, and not the
subforms. So I thought I would just drop the code into
each subform, but the form events do not fire the way
they do on the main form. I tried to put the code in the
forms.activate event, and the eventnever fires.
So I am thinking maybe I need to loop through the
controls on the main form setting the properties that
way, and Im just getting myself more confused.....
I need to be able to reference the tab control, and the
subform control, down to the form on the subform..... all
to lock down update privilges on the forms.
I hope I am not being to confusing..... In a nutshell, I
am looking at the role the user belongs to in the SQL
Database, and passing that back to the form..... That
determines what update rights a user has on the form.
Either full rights, no update rights, or partial rights
(update only certain fields)......
Any ideas ??