Forms :: OnChange Event - Setting Password Protection On Tab Control
Nov 4, 2013
I have an Access 2010 form within my database in which I have a series of 8 tabs on a tab control. I am the only user who will have access to these tabs. I want to require a password in order to permit access to the tabs. The very first tab on the tab control works as a cover tab. There is no relevant information for anyone to view...only a graphic.
How to code the "on change" event of the tab control.
On my form i have a control called WeekDate (this is always the start of the week (monday), below i have a subform (sbfrmWorksheetDetails) contained in a tab control (tabWeek) with 5 pages for each day of the week, i have written a select case statement in the onchange event for tabWeek which selects records based on the day of the week (so = WeekDate for Monday, +1 for Tuesday, +2 for Wednesday etc), this works great, i have also put a bit of code in the same onchange event that makes the default value for a new record for the field WorkDayDate in the subform +1 and +2 etc. this works great for existing records, each new line in the subform puts the right date in, however this seems to cock up when clicking on a new tab that doesn't have a record in..Here's the code.
Private Sub tabWeek_Change() Select Case tabWeek Case 0 'Monday Forms!WeeklyWorksheet!sbfrmWorksheetDetails.Form.R ecordSource = "SELECT * FROM tblWorksheetDetails WHERE (((tblWorksheetDetails.WorkDayDate) = [Forms]![WeeklyWorksheet]![WorksheetDate]))" Forms!WeeklyWorksheet!sbfrmWorksheetDetails.Form!W orkDayDate.DefaultValue = SQLDate(Me.WorksheetDate) Case 1 'Tuesday Same as above but WorksheetDate+ 1 for both select and default value. Case 2 'Wednesday Same but +2 etc. End Select End Sub
the SQLDate is some code that converts the american US date formatting to UK formatting. i'm not sure if that's the problem, but i'll post that anyway:
Function SQLDate(vDate As Variant) As String If IsDate(vDate) Then SQLDate = "#" & Format$(vDate, "dd/mm/yyyy") & "#" End If End Function
I can't quite work out what screwing this up upon adding a new record.
I need some help creating a way for two different type of users to be redirected to different forms after entering a password. I tried using the groups security in access but it's not good.
What I need the program to do is:
ask the user to enter a password. then if the password is correct and they are managers they will see the managers opening form ("form1") and if they are employees they will se a different opening form("form2") with less options and different reports.
I have set up a front screen which has linked buttons to other forms. When I open up some of the forms (using the buttons) I would like them to be password protected.
I know tihs is probably really easy, but I cant get it sussed!!
I am trying to set password protection on a combobox where there are only a few people who I want to be able to select their name to provide authorisation. I found the below code on a website and modified it slightly for my table (tbl_Approval) that contains two fields; Approver and Password. I can see how the code is supposed to work however I keep getting a syntax error (missing operator) in query expression on line: Set rs = CurrentDb.OpenRecordset(sql).
Code: Private Sub Approved_By_Enter() Dim pwd As String Dim rs As Object, rstable As Object, count As Integer, counter As_ Integer Dim sql As String, recount As Integer sql = "SELECT * " & "FROM [tbl_Approval] " & "WHERE [Approver]= " & Me.Approved_By Set rs = CurrentDb.OpenRecordset(sql)
I have been working on some database protection techniques and have found floors in all of them.
Basically I have to protect a database not using the application password... which has a different password for each form. This means using form passwords ect... but all of them can be hacked by using the shift key on start-up does anyone know how to get around this as im stuck and could really do with another’s perspective.
I need to know if there is any way to password protect a single query. I currently have a database and there are several users that have access to run queries but I need to have some security as others are making modifications to queries that they shouldn't be.
I have a set of command buttons on a form that open up a series of reports. The problem I have is that only certain users should have access to particular reports and I want to be able to put some kind of password protection in.
If anyone knows how to do this please let me know.
I have an old access 97 database that I can open with a user password, but cannot open as an administrator. I need to look at some development issues. My problem is that the vendor who wrote the database no longer exists to help me. Does anyone know how to strip off password so that I can examine this old database?
I have a small tracking Access DB at work that someone put a password on. No one seems to know the password. I'm wondering if there is a file that stores the password so that I can remove it so I can access the DB.
Password Protection for E-mailed Access Report Sorry this is a bit long winded but here goes - we have a very simple Access 2002 DB of 60 – 100 client records. It’s updated weekly and a report is then sent to a distribution list. In the past it was printed and faxed. As all on the list have e-mail I set up a macro to e-mail the .mdb to an Outook Distribution List. It works wonderfully and is much easier and faster. However - a couple of weeks ago one of the users complained saying we must password protect the data. Our Exchange Server is not yet set up to use certificates and Ditital IDs so I worked out the only way I can think of to p/w protect the file. The data is exported as an RTF. Once the user is in Outlook she opens the attachment and runs a macro in Word which :- Saves the RTF as a DOC file (uses the same name each time) Saves the DOC file with password protection However the user reports that often it seems to link to the previous weeks data unless she deletes the attached file and opens the TEMP internet files folder, finds the correct week and attaches that. Can anyone think of an easier and more foolproof way of doing this – is there something in Access I have missed? Thanks for any help or advice – Dika
I would like to know if I can create a password protection on specific tables. Within my database, there are certain tables and/or reports to be view by a selective amount of personnel. Can I password protect just that view?
Just as the title describes, I can't seem to find a solution to be able to link the front-end to the back-end tables through the common file dialog when the backend is an accdb file that is password encrypted.
See the example attached. Here it should work just fine per the Article at :
http://support.microsoft.com/kb/181076
I've found it works fine without a password encrypted back-end but not with a password encrypted back-end.
Anyone have any ideas? It would be nice to use this feature in Access as well as automating the relinking.
The expression On Click you entered as the event property setting produced the following error: Procedure declaration does not match description of event or procedure having the same name
Now this is the error message that I am constantly getting from any command button I hit on a certain form. Here is the code of the form.
Option Compare Database Option Explicit Public inputCSV As String, ORG As String
I changed the names of the buttons, reconstructed the code under those names, went to the modules and changed names, made sure that a sub o function name is not duplicated in the project... But helas the error is still there. It used to work and suddenly does not work.
I want a combo box to be enabled only when I want to edit the data in the cbo for that particular record or when the fo0rm is on a new record. So, by default the cbo is Enabled No and Locked Yes. I placed a button on the form and put the following in the On Click:
Code:
Private Sub cmdEditContactsType_Click() Me!cboContactFilter.Enabled = True Me!cboContactFilter.Locked = False End Sub
But when I press the button the control remains disabled.The field has several Contact genres and since I'm using the data in a split form allowing edits to the single form side I don't want this cbo enabled during browsing.
I have an unbound form which has 2 unbound combo boxes on it, both based on the same table, but I have used a query for each one to created the sort order, one alphabetically by item name (cmbA) and the other numerically by the item number (cmbN) . I also have a text field (ID) upon which is based a report when the user clicks a button. Currently the text box (ID) has a control source of column 1 of cmbA and I have the report working perfectly if one selects from the name combo box (cmbA) What I want to do is allow the user to select from cmbN and have the control source of the ID text box equal the number the selected so the report button will work then also.
I have tried to set the control source after update of cmbN but all that does is blank out the ID text box. I have not done this before so I am sure I have done it incorrectly. I tried again this morning using me.ID.ControlSource = Me.cmbN and stepping through the code shows that the cmbN ControlSource is equal to ID but I can't make the code that follows use the results.
I have a combo box control in my form named PayDateID, but I told that control to DISPLAY the associated field PayDate.
I now am trying to make a separate control in the same form whose control source is the DISPLAYED PayDate, but it only wants to reference the underlying PayDateID.
How can I make the control source be the displayed value in that combo box?
I have a listbox on a subform (or a subform within a subform).
When it is clicked I want all other listboxes to unselect.
There may be listboxes on the mainform, on other subforms, on other subforms of subforms.
I imagine I'm looking at a recursive function of some sort, but I'm not entirely sure of syntax to identify parent and children forms...
pseudocode so far: loop all controls if control = listbox, unselect all if control = subform - recurse: loop all subform controls if control = parent... err... Fail.
On a form I have a pair of controls, Price and PriceInUSD. If the user enters a new value into the Price field, then its AfterUpdate event fires, which looks up the relevant exchange rate and updates the PriceInUSD control accordingly. That all works fine.
Now in some circumstances (if a checkbox elsewhere on the form is checked), I generate a modal dialog box asking the user to confirm that the Price value is correct, or enter a new value.
That modal dialogue box's Enter button's On Click event then updates the Price control before closing the dialog. That bit works fine, too - but I had thought that this update of the Price control would fire its AfterUpdate event - but it doesn't.
So, my basic question is : do Control events only fire in response to user input, and not to programmed changes ?
I have a date control and on the Click event I run the following code. Trouble is the Date Control stops working, ie you can't change the date after one click ?
CODE.
Private Sub Calendar7_Click() weekofyeartxt.Value = DatePart("ww", Calendar7.Value) End Sub
I have a main form that holds a tab control with a number of sub forms. One of these subforms has a pop up form for adding new records to it. After closing this pop up form I would like to initate code on the sub form where the new record now will appear. One of the things I like to do is simply to set focus to the record the user just added.
My problem is that I cannot seem to get any event to trigger in this setting (bben trying more or less all). If I understand things right the fact that I am using a pop up form and the fact that I am using a tab control both seem to interfer with the Activate event and making it passive.
How I can trigger code on the sub form (after closing the "Add New" pop up form)?
I have validation on a checkbox on a sub form and after the validation fails and the cancel = true is executed in the before update event, I am unable to select the checkbox on the form. Access will not allow the selection. my subform is called frmContactType so hopefully I am referencing it correctly:
I'm currently designing a small database which will be distributed to users most probably using the access2007 runtime. I would like to be able to ship the database with a default username and password. Is this possible in acces 2007 ? If it is possible, how would I go about enabling individual users to change the default username/password and set up a username/password of their choice ?
Can you tell me please is there any way to set password to form design view button in a .mdb database? I have seen it somewhere that a guy set password if you want to view his modules in a design view. Is it possible to do the same with forms, reports etc. Any help is very welcome.