P
PayeDoc
Hello All
I have a split FE/BE mdb, with a 'master' FE that is on the server - mapped
as Z drive - that I work on, and various copies of the FE on various PCs
that the users work on. I need to prevent a particular combobox selection
("PayeDoc") from being made if the user is working on one of the local FE
copies: only a user working on the 'master' FE (on the Z drive) should be
able to select "PayeDoc". I have tried using the code below as the OnChange,
and the BeforeUpdate, and the AfterUpdate event of the combobox, but none of
these has worked - no errors, but the ability to select "PayeDoc" has not
been affected.
Private Sub prac_name_BeforeUpdate(Cancel As Integer)
If [CurrentProject].[path] <> "Z:" And [Forms]![frm x main]![prac name] =
"PayeDoc" Then
Me.Undo
MsgBox ("Condition met")
End If
End Sub
I know that the condition is being satisfied appropriately, because the
"Condition met" message is displayed as expected. It's the Me.Undo that
isn't happening.
What have I done wrong - and how can I achieve what I need?
Hope someone can help.
Many thanks
Leslie Isaacs
I have a split FE/BE mdb, with a 'master' FE that is on the server - mapped
as Z drive - that I work on, and various copies of the FE on various PCs
that the users work on. I need to prevent a particular combobox selection
("PayeDoc") from being made if the user is working on one of the local FE
copies: only a user working on the 'master' FE (on the Z drive) should be
able to select "PayeDoc". I have tried using the code below as the OnChange,
and the BeforeUpdate, and the AfterUpdate event of the combobox, but none of
these has worked - no errors, but the ability to select "PayeDoc" has not
been affected.
Private Sub prac_name_BeforeUpdate(Cancel As Integer)
If [CurrentProject].[path] <> "Z:" And [Forms]![frm x main]![prac name] =
"PayeDoc" Then
Me.Undo
MsgBox ("Condition met")
End If
End Sub
I know that the condition is being satisfied appropriately, because the
"Condition met" message is displayed as expected. It's the Me.Undo that
isn't happening.
What have I done wrong - and how can I achieve what I need?
Hope someone can help.
Many thanks
Leslie Isaacs