|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Control TabsI have designed a Form with Tabs to move from one section of the form to
another. I have the following OnChange Event procedure that will not allow changes to be made without a Password: Private Sub TabCtl0_Change() If Me!TabCtl0 = 7 Then If Not InputBox("Please Enter Password") = "roger" Then Me!TabCtl0 = 0 MsgBox "Sorry, Incorrect Password" End If The problem is that as soon as the user clicks this Tab, the message box appears asking for the Password; however, the User can still view the confidential information on this screen behind the Message Box. Is there a way to prevent this? Thanks for any help Hi Roger
You are right. The Change event fires after the new page has been displayed. It's a pity they didn't think to make it a cancellable event. I've tried Click and MouseDown also and they are of no use. Perhaps you could do this by placing a masking rectangular box over the page and setting its Visible property to False if the required authentication is achieved. -- Show quoteHide quoteGood Luck! Graham Mandeno [Access MVP] Auckland, New Zealand "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message news:1F1B0DC4-FCC9-430B-B4AC-76EBCBB979CD@microsoft.com... >I have designed a Form with Tabs to move from one section of the form to > another. I have the following OnChange Event procedure that will not > allow > changes to be made without a Password: > Private Sub TabCtl0_Change() > If Me!TabCtl0 = 7 Then > If Not InputBox("Please Enter Password") = "roger" Then > Me!TabCtl0 = 0 > MsgBox "Sorry, Incorrect Password" > End If > The problem is that as soon as the user clicks this Tab, the message box > appears asking for the Password; however, the User can still view the > confidential information on this screen behind the Message Box. > > Is there a way to prevent this? > Thanks for any help Thanks for your suggestion Graham. Have used a Masking Rectangular box over
the page. Could you please tell me the code I would need to write and where it should appear. You help is much appreciated Show quoteHide quote "Graham Mandeno" wrote: > Hi Roger > > You are right. The Change event fires after the new page has been > displayed. It's a pity they didn't think to make it a cancellable event. > > I've tried Click and MouseDown also and they are of no use. > > Perhaps you could do this by placing a masking rectangular box over the page > and setting its Visible property to False if the required authentication is > achieved. > -- > Good Luck! > > Graham Mandeno [Access MVP] > Auckland, New Zealand > > "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message > news:1F1B0DC4-FCC9-430B-B4AC-76EBCBB979CD@microsoft.com... > >I have designed a Form with Tabs to move from one section of the form to > > another. I have the following OnChange Event procedure that will not > > allow > > changes to be made without a Password: > > Private Sub TabCtl0_Change() > > If Me!TabCtl0 = 7 Then > > If Not InputBox("Please Enter Password") = "roger" Then > > Me!TabCtl0 = 0 > > MsgBox "Sorry, Incorrect Password" > > End If > > The problem is that as soon as the user clicks this Tab, the message box > > appears asking for the Password; however, the User can still view the > > confidential information on this screen behind the Message Box. > > > > Is there a way to prevent this? > > Thanks for any help > > > Hi Roger
You just need to make the rectangle visible (mask the page) at the beginning of your Change procedure and hide it if the authorisation is successful. Private Sub TabCtl0_Change() rctMask.Visible = True ' mask page 7 If Me!TabCtl0 = 7 Then If Not InputBox("Please Enter Password") = "roger" Then Me!TabCtl0 = 0 MsgBox "Sorry, Incorrect Password" Else ' show the tab page rctMask.Visible = False End If End If End Sub Be sure that you do Format>Bring to Front on the rectangle and Format>Send to back on all the other controls on the tab page. Also, you might find it frustrating having the rectangle covering everything in design view, so set its height and width to zero (or something very small) in design view and resize it in your Form_Load procedure. -- Show quoteHide quoteGood Luck! Graham Mandeno [Access MVP] Auckland, New Zealand "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message news:5063FA08-6B72-40EE-980B-F678959ECD1E@microsoft.com... > Thanks for your suggestion Graham. Have used a Masking Rectangular box > over > the page. Could you please tell me the code I would need to write and > where > it should appear. > > You help is much appreciated > > > "Graham Mandeno" wrote: > >> Hi Roger >> >> You are right. The Change event fires after the new page has been >> displayed. It's a pity they didn't think to make it a cancellable event. >> >> I've tried Click and MouseDown also and they are of no use. >> >> Perhaps you could do this by placing a masking rectangular box over the >> page >> and setting its Visible property to False if the required authentication >> is >> achieved. >> -- >> Good Luck! >> >> Graham Mandeno [Access MVP] >> Auckland, New Zealand >> >> "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message >> news:1F1B0DC4-FCC9-430B-B4AC-76EBCBB979CD@microsoft.com... >> >I have designed a Form with Tabs to move from one section of the form to >> > another. I have the following OnChange Event procedure that will not >> > allow >> > changes to be made without a Password: >> > Private Sub TabCtl0_Change() >> > If Me!TabCtl0 = 7 Then >> > If Not InputBox("Please Enter Password") = "roger" Then >> > Me!TabCtl0 = 0 >> > MsgBox "Sorry, Incorrect Password" >> > End If >> > The problem is that as soon as the user clicks this Tab, the message >> > box >> > appears asking for the Password; however, the User can still view the >> > confidential information on this screen behind the Message Box. >> > >> > Is there a way to prevent this? >> > Thanks for any help >> >> >> Thanks again Graham. Have added the code as follows to the OnChange event
procedure of the TabCtl. However when I run the command I am getting an error referring to the line rctMask.Visible......... Maybe I have the rectangle incorrect. I used the Rectangle tool and covered Page 7 and then used fill/back colour to block out the fields for just this page. Have I done this correctly? as I am not to familiar with Masking Thanks again for your patience Private Sub TabCtl0_Change() rctMask.Visible = True ' Mask page 7 If Me!TabCtl0 = 7 Then If Not InputBox("Please Enter Password") = "roger" Then Me!TabCtl0 = 0 MsgBox "Sorry, Incorrect Password" Else 'show the tab page rctMask.Visible False End If End If End Sub Show quoteHide quote "Graham Mandeno" wrote: > Hi Roger > > You just need to make the rectangle visible (mask the page) at the beginning > of your Change procedure and hide it if the authorisation is successful. > > Private Sub TabCtl0_Change() > rctMask.Visible = True ' mask page 7 > If Me!TabCtl0 = 7 Then > If Not InputBox("Please Enter Password") = "roger" Then > Me!TabCtl0 = 0 > MsgBox "Sorry, Incorrect Password" > > Else > ' show the tab page > rctMask.Visible = False > End If > End If > End Sub > > Be sure that you do Format>Bring to Front on the rectangle and Format>Send > to back on all the other controls on the tab page. > > Also, you might find it frustrating having the rectangle covering everything > in design view, so set its height and width to zero (or something very > small) in design view and resize it in your Form_Load procedure. > > -- > Good Luck! > > Graham Mandeno [Access MVP] > Auckland, New Zealand > > "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message > news:5063FA08-6B72-40EE-980B-F678959ECD1E@microsoft.com... > > Thanks for your suggestion Graham. Have used a Masking Rectangular box > > over > > the page. Could you please tell me the code I would need to write and > > where > > it should appear. > > > > You help is much appreciated > > > > > > "Graham Mandeno" wrote: > > > >> Hi Roger > >> > >> You are right. The Change event fires after the new page has been > >> displayed. It's a pity they didn't think to make it a cancellable event. > >> > >> I've tried Click and MouseDown also and they are of no use. > >> > >> Perhaps you could do this by placing a masking rectangular box over the > >> page > >> and setting its Visible property to False if the required authentication > >> is > >> achieved. > >> -- > >> Good Luck! > >> > >> Graham Mandeno [Access MVP] > >> Auckland, New Zealand > >> > >> "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message > >> news:1F1B0DC4-FCC9-430B-B4AC-76EBCBB979CD@microsoft.com... > >> >I have designed a Form with Tabs to move from one section of the form to > >> > another. I have the following OnChange Event procedure that will not > >> > allow > >> > changes to be made without a Password: > >> > Private Sub TabCtl0_Change() > >> > If Me!TabCtl0 = 7 Then > >> > If Not InputBox("Please Enter Password") = "roger" Then > >> > Me!TabCtl0 = 0 > >> > MsgBox "Sorry, Incorrect Password" > >> > End If > >> > The problem is that as soon as the user clicks this Tab, the message > >> > box > >> > appears asking for the Password; however, the User can still view the > >> > confidential information on this screen behind the Message Box. > >> > > >> > Is there a way to prevent this? > >> > Thanks for any help > >> > >> > >> > > > Hi Roger
You mean the line that says: rctMask.Visible False ??? That's because you left out the "=" sign. What I said was: rctMask.Visible = False BTW, make sure that the name of the rectangle control is "rctMask". -- Show quoteHide quoteGood Luck! Graham Mandeno [Access MVP] Auckland, New Zealand "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message news:020C3DDE-3789-4384-AB04-DC91A1FCF00E@microsoft.com... > Thanks again Graham. Have added the code as follows to the OnChange event > procedure of the TabCtl. However when I run the command I am getting an > error referring to the line rctMask.Visible......... > Maybe I have the rectangle incorrect. I used the Rectangle tool and > covered > Page 7 and then used fill/back colour to block out the fields for just > this > page. Have I done this correctly? as I am not to familiar with Masking > > Thanks again for your patience > > Private Sub TabCtl0_Change() > rctMask.Visible = True ' Mask page 7 > If Me!TabCtl0 = 7 Then > If Not InputBox("Please Enter Password") = "roger" Then > Me!TabCtl0 = 0 > MsgBox "Sorry, Incorrect Password" > > Else > 'show the tab page > rctMask.Visible False > End If > End If > End Sub > > "Graham Mandeno" wrote: > >> Hi Roger >> >> You just need to make the rectangle visible (mask the page) at the >> beginning >> of your Change procedure and hide it if the authorisation is successful. >> >> Private Sub TabCtl0_Change() >> rctMask.Visible = True ' mask page 7 >> If Me!TabCtl0 = 7 Then >> If Not InputBox("Please Enter Password") = "roger" Then >> Me!TabCtl0 = 0 >> MsgBox "Sorry, Incorrect Password" >> >> Else >> ' show the tab page >> rctMask.Visible = False >> End If >> End If >> End Sub >> >> Be sure that you do Format>Bring to Front on the rectangle and >> Format>Send >> to back on all the other controls on the tab page. >> >> Also, you might find it frustrating having the rectangle covering >> everything >> in design view, so set its height and width to zero (or something very >> small) in design view and resize it in your Form_Load procedure. >> >> -- >> Good Luck! >> >> Graham Mandeno [Access MVP] >> Auckland, New Zealand >> >> "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message >> news:5063FA08-6B72-40EE-980B-F678959ECD1E@microsoft.com... >> > Thanks for your suggestion Graham. Have used a Masking Rectangular box >> > over >> > the page. Could you please tell me the code I would need to write and >> > where >> > it should appear. >> > >> > You help is much appreciated >> > >> > >> > "Graham Mandeno" wrote: >> > >> >> Hi Roger >> >> >> >> You are right. The Change event fires after the new page has been >> >> displayed. It's a pity they didn't think to make it a cancellable >> >> event. >> >> >> >> I've tried Click and MouseDown also and they are of no use. >> >> >> >> Perhaps you could do this by placing a masking rectangular box over >> >> the >> >> page >> >> and setting its Visible property to False if the required >> >> authentication >> >> is >> >> achieved. >> >> -- >> >> Good Luck! >> >> >> >> Graham Mandeno [Access MVP] >> >> Auckland, New Zealand >> >> >> >> "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message >> >> news:1F1B0DC4-FCC9-430B-B4AC-76EBCBB979CD@microsoft.com... >> >> >I have designed a Form with Tabs to move from one section of the form >> >> >to >> >> > another. I have the following OnChange Event procedure that will >> >> > not >> >> > allow >> >> > changes to be made without a Password: >> >> > Private Sub TabCtl0_Change() >> >> > If Me!TabCtl0 = 7 Then >> >> > If Not InputBox("Please Enter Password") = "roger" Then >> >> > Me!TabCtl0 = 0 >> >> > MsgBox "Sorry, Incorrect Password" >> >> > End If >> >> > The problem is that as soon as the user clicks this Tab, the message >> >> > box >> >> > appears asking for the Password; however, the User can still view >> >> > the >> >> > confidential information on this screen behind the Message Box. >> >> > >> >> > Is there a way to prevent this? >> >> > Thanks for any help >> >> >> >> >> >> >> >> >> Just wanted to express my gratitude for your excellent help in this matter.
I finally succeeded in no small part thanks to you Show quoteHide quote "Graham Mandeno" wrote: > Hi Roger > > You mean the line that says: > rctMask.Visible False > ??? > > That's because you left out the "=" sign. What I said was: > rctMask.Visible = False > > BTW, make sure that the name of the rectangle control is "rctMask". > -- > Good Luck! > > Graham Mandeno [Access MVP] > Auckland, New Zealand > > "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message > news:020C3DDE-3789-4384-AB04-DC91A1FCF00E@microsoft.com... > > Thanks again Graham. Have added the code as follows to the OnChange event > > procedure of the TabCtl. However when I run the command I am getting an > > error referring to the line rctMask.Visible......... > > Maybe I have the rectangle incorrect. I used the Rectangle tool and > > covered > > Page 7 and then used fill/back colour to block out the fields for just > > this > > page. Have I done this correctly? as I am not to familiar with Masking > > > > Thanks again for your patience > > > > Private Sub TabCtl0_Change() > > rctMask.Visible = True ' Mask page 7 > > If Me!TabCtl0 = 7 Then > > If Not InputBox("Please Enter Password") = "roger" Then > > Me!TabCtl0 = 0 > > MsgBox "Sorry, Incorrect Password" > > > > Else > > 'show the tab page > > rctMask.Visible False > > End If > > End If > > End Sub > > > > "Graham Mandeno" wrote: > > > >> Hi Roger > >> > >> You just need to make the rectangle visible (mask the page) at the > >> beginning > >> of your Change procedure and hide it if the authorisation is successful. > >> > >> Private Sub TabCtl0_Change() > >> rctMask.Visible = True ' mask page 7 > >> If Me!TabCtl0 = 7 Then > >> If Not InputBox("Please Enter Password") = "roger" Then > >> Me!TabCtl0 = 0 > >> MsgBox "Sorry, Incorrect Password" > >> > >> Else > >> ' show the tab page > >> rctMask.Visible = False > >> End If > >> End If > >> End Sub > >> > >> Be sure that you do Format>Bring to Front on the rectangle and > >> Format>Send > >> to back on all the other controls on the tab page. > >> > >> Also, you might find it frustrating having the rectangle covering > >> everything > >> in design view, so set its height and width to zero (or something very > >> small) in design view and resize it in your Form_Load procedure. > >> > >> -- > >> Good Luck! > >> > >> Graham Mandeno [Access MVP] > >> Auckland, New Zealand > >> > >> "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message > >> news:5063FA08-6B72-40EE-980B-F678959ECD1E@microsoft.com... > >> > Thanks for your suggestion Graham. Have used a Masking Rectangular box > >> > over > >> > the page. Could you please tell me the code I would need to write and > >> > where > >> > it should appear. > >> > > >> > You help is much appreciated > >> > > >> > > >> > "Graham Mandeno" wrote: > >> > > >> >> Hi Roger > >> >> > >> >> You are right. The Change event fires after the new page has been > >> >> displayed. It's a pity they didn't think to make it a cancellable > >> >> event. > >> >> > >> >> I've tried Click and MouseDown also and they are of no use. > >> >> > >> >> Perhaps you could do this by placing a masking rectangular box over > >> >> the > >> >> page > >> >> and setting its Visible property to False if the required > >> >> authentication > >> >> is > >> >> achieved. > >> >> -- > >> >> Good Luck! > >> >> > >> >> Graham Mandeno [Access MVP] > >> >> Auckland, New Zealand > >> >> > >> >> "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message > >> >> news:1F1B0DC4-FCC9-430B-B4AC-76EBCBB979CD@microsoft.com... > >> >> >I have designed a Form with Tabs to move from one section of the form > >> >> >to > >> >> > another. I have the following OnChange Event procedure that will > >> >> > not > >> >> > allow > >> >> > changes to be made without a Password: > >> >> > Private Sub TabCtl0_Change() > >> >> > If Me!TabCtl0 = 7 Then > >> >> > If Not InputBox("Please Enter Password") = "roger" Then > >> >> > Me!TabCtl0 = 0 > >> >> > MsgBox "Sorry, Incorrect Password" > >> >> > End If > >> >> > The problem is that as soon as the user clicks this Tab, the message > >> >> > box > >> >> > appears asking for the Password; however, the User can still view > >> >> > the > >> >> > confidential information on this screen behind the Message Box. > >> >> > > >> >> > Is there a way to prevent this? > >> >> > Thanks for any help > >> >> > >> >> > >> >> > >> > >> > >> > > > You're welcome, Roger. Glad to know you got it all working :-)
-- Show quoteHide quoteGood Luck! Graham Mandeno [Access MVP] Auckland, New Zealand "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message news:42A6CFDA-2DB9-4D94-AD91-CDE0B2EF1E03@microsoft.com... > Just wanted to express my gratitude for your excellent help in this > matter. > I finally succeeded in no small part thanks to you > > > "Graham Mandeno" wrote: > >> Hi Roger >> >> You mean the line that says: >> rctMask.Visible False >> ??? >> >> That's because you left out the "=" sign. What I said was: >> rctMask.Visible = False >> >> BTW, make sure that the name of the rectangle control is "rctMask". >> -- >> Good Luck! >> >> Graham Mandeno [Access MVP] >> Auckland, New Zealand >> >> "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message >> news:020C3DDE-3789-4384-AB04-DC91A1FCF00E@microsoft.com... >> > Thanks again Graham. Have added the code as follows to the OnChange >> > event >> > procedure of the TabCtl. However when I run the command I am getting >> > an >> > error referring to the line rctMask.Visible......... >> > Maybe I have the rectangle incorrect. I used the Rectangle tool and >> > covered >> > Page 7 and then used fill/back colour to block out the fields for just >> > this >> > page. Have I done this correctly? as I am not to familiar with >> > Masking >> > >> > Thanks again for your patience >> > >> > Private Sub TabCtl0_Change() >> > rctMask.Visible = True ' Mask page 7 >> > If Me!TabCtl0 = 7 Then >> > If Not InputBox("Please Enter Password") = "roger" Then >> > Me!TabCtl0 = 0 >> > MsgBox "Sorry, Incorrect Password" >> > >> > Else >> > 'show the tab page >> > rctMask.Visible False >> > End If >> > End If >> > End Sub >> > >> > "Graham Mandeno" wrote: >> > >> >> Hi Roger >> >> >> >> You just need to make the rectangle visible (mask the page) at the >> >> beginning >> >> of your Change procedure and hide it if the authorisation is >> >> successful. >> >> >> >> Private Sub TabCtl0_Change() >> >> rctMask.Visible = True ' mask page 7 >> >> If Me!TabCtl0 = 7 Then >> >> If Not InputBox("Please Enter Password") = "roger" Then >> >> Me!TabCtl0 = 0 >> >> MsgBox "Sorry, Incorrect Password" >> >> >> >> Else >> >> ' show the tab page >> >> rctMask.Visible = False >> >> End If >> >> End If >> >> End Sub >> >> >> >> Be sure that you do Format>Bring to Front on the rectangle and >> >> Format>Send >> >> to back on all the other controls on the tab page. >> >> >> >> Also, you might find it frustrating having the rectangle covering >> >> everything >> >> in design view, so set its height and width to zero (or something very >> >> small) in design view and resize it in your Form_Load procedure. >> >> >> >> -- >> >> Good Luck! >> >> >> >> Graham Mandeno [Access MVP] >> >> Auckland, New Zealand >> >> >> >> "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message >> >> news:5063FA08-6B72-40EE-980B-F678959ECD1E@microsoft.com... >> >> > Thanks for your suggestion Graham. Have used a Masking Rectangular >> >> > box >> >> > over >> >> > the page. Could you please tell me the code I would need to write >> >> > and >> >> > where >> >> > it should appear. >> >> > >> >> > You help is much appreciated >> >> > >> >> > >> >> > "Graham Mandeno" wrote: >> >> > >> >> >> Hi Roger >> >> >> >> >> >> You are right. The Change event fires after the new page has been >> >> >> displayed. It's a pity they didn't think to make it a cancellable >> >> >> event. >> >> >> >> >> >> I've tried Click and MouseDown also and they are of no use. >> >> >> >> >> >> Perhaps you could do this by placing a masking rectangular box over >> >> >> the >> >> >> page >> >> >> and setting its Visible property to False if the required >> >> >> authentication >> >> >> is >> >> >> achieved. >> >> >> -- >> >> >> Good Luck! >> >> >> >> >> >> Graham Mandeno [Access MVP] >> >> >> Auckland, New Zealand >> >> >> >> >> >> "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message >> >> >> news:1F1B0DC4-FCC9-430B-B4AC-76EBCBB979CD@microsoft.com... >> >> >> >I have designed a Form with Tabs to move from one section of the >> >> >> >form >> >> >> >to >> >> >> > another. I have the following OnChange Event procedure that will >> >> >> > not >> >> >> > allow >> >> >> > changes to be made without a Password: >> >> >> > Private Sub TabCtl0_Change() >> >> >> > If Me!TabCtl0 = 7 Then >> >> >> > If Not InputBox("Please Enter Password") = "roger" Then >> >> >> > Me!TabCtl0 = 0 >> >> >> > MsgBox "Sorry, Incorrect Password" >> >> >> > End If >> >> >> > The problem is that as soon as the user clicks this Tab, the >> >> >> > message >> >> >> > box >> >> >> > appears asking for the Password; however, the User can still view >> >> >> > the >> >> >> > confidential information on this screen behind the Message Box. >> >> >> > >> >> >> > Is there a way to prevent this? >> >> >> > Thanks for any help >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>
Domain user as Local admin
Show/Hide objects based on Security Groups Groups question Access Runtime 2002 - User Account permissions error... Disconnecting a link System.mdw - how do I find out which databases are using it? Access Security Problem - User/Group Reporting fails in applicatio USAF Standard Desktop prevents opening database DbUtilities 2000 Addin "Jeff Conrad" Website & AD Authentication |
|||||||||||||||||||||||