Forms :: Locking Fields In Forms?

Oct 30, 2013

locking entry of data in a form. Attached is the database in which my question lies.

The user first interacts with Table 1, which then leads to the opening of the Personal form (as per the user's wishes). What I would like to do is:

1: To give the user the authority to enter data in those cases where the fields in the Personal form is empty (in the case of the Names). The user should not be able to change any data if these fields are not empty.

2: To give the user the ability to change the Amount (If this figure is Zero) and not to change anything if this amount is not Zero.

View Replies


ADVERTISEMENT

Forms :: Locking Fields Even If They Have Unsaved Changes

Aug 8, 2013

I have a button on my form which locks (and disables) some fields. by locking and disabling fields, I am able to change the back color of the fields to a "grayed out" look to warn the user that they cannot change the contents of the field.

some of the fields that I have disabled are in fact option buttons and check boxes which have no back color to change, keep this in mind!

So i have a macro that changes ALL of the fields to disabled and locked, as well as their background color.

This causes an error with the check boxes and option boxes so to bipass them I have got the clause "On Error Resume Next" so that my macro continues to complete and finish locking the rest of the form.

With this "On Error Resume Next", If the code reaches a field which has been changed, another error occurs due to a field being changed which blocks the rest of the code from working however why it wont change regardless of the issue, I dont care if the content was saved to a record or not, I just want to put the fields into disabled and locked.

Is there a way I can remove this "You Can't Lock A control while it has unsaved changes" error to ignore that there has been changes? Where the changes just dont matter?

View 13 Replies View Related

Forms :: Locking Row Source Fields In Properties Menu?

Mar 5, 2013

Is there a way to lock the row source fields in the properties menu as currently it keeps creating exceptions (WHERE) onto the end of the SQL this is subsequently causing me major issues in the view of the form/datasheet as fields keep appearing as blank when there is actually values stored within the table.

View 5 Replies View Related

Forms :: Locking Combo Boxes Using VBA

Jul 12, 2013

Im working in MS Access 2007.I have 3 combo boxes on a form. My goal is simple I would like the 2nd and 3rd comboboxes to be locked unless the user has already chosen selected an item from the 1rst combo box. The code im trying to get working now is in a On_Current event so that when the first combo box has nothing selected, combo box 2 and 3 are locked.

This is my code where
combo box 1 = areabox2
combo box 2 = devbox2
combo box 3 = entitybox2

[code]...

The issue is that the entitybox2 and devbox2 do not lock!

View 5 Replies View Related

Forms :: Allowing / Locking Edit In A Form

Jul 21, 2013

I'm using Access 2003.I'm trying to create a command for a form that will allow editing or lock all fields, so that records are protected from accidental edits.AllowEdits in the form is set to False by default.I've used the below code to allow a user to unlock the form:

Private Sub cmdEditRecord_Click()
If Me.AllowEdits = False Then
Me.AllowEdits = True
Else
Me.AllowEdits = True
End If
End Sub

And this works without issue.However, I want to create a second button to lock the form again.

Private Sub cmdLockRecord_Click()
If Me.AllowEdits = True Then
Me.AllowEdits = False
Else
Me.AllowEdits = False
End If
End Sub

Seems logical that I should just be able to reverse the true/false but this does nothing!I've also tried the below code:

Private Sub cmdEditRecord_Click()
Me.AllowEdits = Not (Me.AllowEdits)
End Sub

To toggle between editing/locked, with the same results - ie, can switch to editing, but can't then turn it off.

View 5 Replies View Related

Forms :: Controls With Data Not Locking Or Disabled

Jun 20, 2014

I've got some forms that I've set to lock controls based on an added tag. I have a loop that goes through the entire form and disables (controlname.enabled = false) or locks (controlname.locked =true) all the controls with that tag.

This appears to work fine when the form is on a blank record but when an existing record is opened, the controls that have data in them are no longer locked or disabled (empty controls are still locked). Is there an explanation for this behavior? I don't want to disable the entire form because there are controls that I want the user to be able to always access. I started by just disabling them, then when I noticed the problem I tried locking them instead but it happens with both. Is there another property I can try that will really lock them if they have data in them or not?

View 1 Replies View Related

Forms :: Locking Form Controls After Input Added

Aug 15, 2013

What's the best way to lock down form controls after the user has entered data into them? I will have a button that reads "Save Record" that will make it so the records cannot be accidentally (or intentionally) changed after the button is clicked.

View 1 Replies View Related

Forms :: Locking Main Form Controls Causes Data In Subform To Disappear?

Dec 12, 2014

So I am creating a Complaint Tracking Database with Access 2013. In my 'complaint entry form' I have added to ability to "Open" and "Close" the complaint. While the complaint is open the user is able to enter/edit data in the complaint (new or old). When the complaint is "Closed" (done so with a button on the form that prompts the user to enter a date of their choice) the user should not be able to enter/edit data in the given complaint. In my original thinking, I placed checks on various events (on load, after update, on click) that checked to see if the current complaint had a date in the "Close date" field.

If the close date field was null then that meant that the complaint was open and the the controls would NOT be locked. If the close date field was NOT null (i.e. a date was present) then the complaint was closed and the main form fields were locked but the data was still viewable and unless they "re-opened" the complaint they could not change the data.

Now, in the complaint entry form, I have a subform that acts as a action tracker that is used by the user to keep track of the actions taken on the complaint (i.e. they requested documentation from such and such on this date..etc). My problem through all of this is upon closing the complaint and locking the main form controls, my subforms data just vanishes! At first I figured the problem might be with the linking of master and child fields, so I made sure that I left the ID in the main form unlocked when I loop through my controls during the locking process. This did not solve my problem. Code below:

Private Sub Form_Load()
Dim ctl As Control
If Not IsNull(Me.close_date) Then
Me.FormHeader.Visible = True
Me.btnClosed.Enabled = False
Me.btnOpen.Enabled = True
For Each ctl In Me.Controls

[Code] .....

View 3 Replies View Related

Locking Fields In A Table

Feb 15, 2006

How do you go about locking certain fields in a table, so that data can only be input to them via the form?? I have a few tick boxes set up, and i want them to changed only in the form, as they can only be ticked under certain circumstances which aren't setup in the table.

View 1 Replies View Related

Locking Specific Fields

Jan 30, 2007

Hey guys,

Is there a setting that will allow me to make specific fields in my table read-only unless I enter a password, or I am the DB administrator?

View 5 Replies View Related

Locking Fields In A Form

Apr 29, 2008

Hi All,

I am really new to all of this and used to use excel for this stuff.... yes I know... I can hear the screems already .......... :):eek::rolleyes:

What I am trying to do is lock some fields in a form when they are entered so the data can not be changed after they move onto the next record. I think this might be done in the table but can not be sure.

Can anyone point me in the right direction? or some pointers please. Any help would be good.

Many thanks

View 3 Replies View Related

Fields Are Locking, But Very Stange

Dec 1, 2005

Hi,

Ok, i have a really stange problem

I have two tables tablea, tableb. They both have the field Line address in which is a number.

However, when i have both these tables in a query and link them on line address the dataview sheet becomes locked. But if i just run a query with tablea on its own, i can write in the dataview and if i just run a query with tableb i can also write in it, but when linked together on line address, it fails

Any ideas?

Thanks
k0r54

View 1 Replies View Related

Locking Fields After Update?

Jun 12, 2006

i have a form that looks like an invoice.. i want to be able to lock the fields invidually after they are updated but only for the current record being accessed... and password protect them to allow editing..
any suggestions or pointers would be great!

thanks

View 4 Replies View Related

Locking Datasheet Fields

Sep 4, 2007

Hello,

I need a little help with locking some fields in a datasheet.

Simply, there are many fields, one of which is a combo which has either Yes/No fields

I would like to lock the records which have a Yes in the field i mentioned.

Ok, what i've tried already. - in on current and after update.
I have also tried this with the Me. function.

if [avail?] = Yes then

Qty.Enabled = True
StockCode.Enabled = True
StockPoint.Enabled = True

Else

Qty.Enabled = False
StockCode.Enabled = False
StockPoint.Enabled = False

end if

This works but locks fields in all the records even when selection is "No".

Any help will be appreciated.

View 2 Replies View Related

Forms :: Continuous Forms - Looping Through Records / Manipulating Fields On Form

May 29, 2015

I have a bound continuous tabular form,However, based on data content in one field of a record, I want a checkbox in the same record enabled, so the user can check it if necessary. I have created a record set using the form as shown below, and I am looping through each record. To show that my code is referring to the field with required data content, I display it as a message box and it works, yet my checkbox does not enable.

I have the code in the form_load event, however, for testing purposes I have it behind a button.If I am seeing this properly, the code behind the button enables the checkbox for ALL records once the criteria in the required field is true, and based on the last record, which has no data content, it disables the checkbox in ALL records. I also have the PK ID for each record hidden in the form. Can I utilize that to target the checkbox of each individual record??

Form Detail
-Form does not allow additions or deletions. Edits allowed
-All fields are disabled and locked
-I only want the check box to unlock if data is found in the "RequiredField" as referred to below. I have also tried if not isNull(requiredfield.value) then -enable checkbox, which yields the same results

Here is my code

Code:

Dim rstMyForm As DAO.Recordset
Set rstMyForm = Forms!MyForm.Form.Recordset
rstMyForm.MoveFirst
Do While Not rstMyForm.EOF
If Not RequiredField.Value = "" Then

[code]...

View 14 Replies View Related

Locking Fields In Access Form

Jun 4, 2012

I have 4 questions (4 fields) in a form. 2 are drop down menu type and 2 are open text fields.I would like to limit the user from entering data in the fields if one has been answered. for example: if Question one is answered, question 2, 3 and 4 should be locked and should not allow the users to fill in anything. How do I create that Locking system?

View 10 Replies View Related

Locking Fields For One Record On A Continuous Form

Jul 22, 2005

How can i apply the following code to the immediate record in my subform. I would like when the assigned check box value = true, then the fields for that record become locked.

Ive written the following code to an onclick event for a check box labeled "assigned" on my form, the problem is it executes on all the records in my form.

Q. How do i apply the code to only the immediate record?


Private Sub Assigned_Click()
If Me.Assigned.Value = True Then
Me.Serial_Number.Enabled = False
Me.Component_Group_ID.Enabled = False
Me.TypeID.Enabled = False
Me.Description.Enabled = False
Me.Status.Enabled = False

Else
Me.Serial_Number.Enabled = True
Me.Component_Group_ID.Enabled = True
Me.TypeID.Enabled = True
Me.Description.Enabled = True
Me.Status.Enabled = True

End If

End Sub

View 3 Replies View Related

Modules & VBA :: Set Of Fields - Method For Locking Records?

Aug 20, 2013

On my form I have a set of fields that can be displayed as editable or read-only depending on a "Lockout" checkbox for that record.Is there an easier way of doing this? If not, would it be smarter to create a function to do this? As it stands I'm assuming I would have to have this code run when the form loads, when the Lockout box is clicked, and whenever the record is changed just to ensure that the records are displayed as locked or unlocked appropriately.

Here's what I have:

Code:
Private Sub Lockout_Click()
If [Lockout] = True Then
Me![Customer_Text].Enabled = False
Me![ReqDesc_Text].Enabled = False
Me![MoreInfo_Text].Enabled = False

[code]....

View 4 Replies View Related

Forms :: Calculated Fields In Continuous Forms

Aug 14, 2015

i have a continues form that lists all my active items and I'd like to use it to quickly check if they have all the data inserted, ie entries in each separate table. it looks like this

I perform a simple check on form load chk = DCount("[phID]", "preh", "[phbID] = " & Me.tID) where me.tid is the item ID and this gives me 0 or 1 and writes ok, or missing into the appropriate box.Problem is it tkaes value for the first item and repeats it for eah other, so I get ok or missing throughout the continuos form.How can i force a check for each line?

View 1 Replies View Related

Forms :: Adding Fields In A Table And Having Output Fill Fields On A Form

Jan 29, 2014

I have a totalquery that runs fine and give me the sum for both fields I'm looking for but I can't get the outputs to fill the fields on the form. I have tried the Dcount query in the control source but that just returns an error and locks up access.

Code:
SELECT [Tble-wcDelays].Causedby, Sum([Tble-wcDelays].HoursDelay) AS SumOfHoursDelay
FROM [Tble-wcDelays]
GROUP BY [Tble-wcDelays].Causedby, [Tble-wcDelays].LinkingID
HAVING ((([Tble-wcDelays].LinkingID)=[Forms]![Frm-ePlusCent]![cleanID]));

That is the query.

View 14 Replies View Related

Forms :: Total Query - Count Of Fields Based On Data In Other Fields

Jun 28, 2015

I have a query that creates counts of fields based on the data in other fields, basically it tells me that in a table there are two entries with value ABC????? and three of DEF????? , the query works perfectly.

When I create a form to display this data and base the form on the Query I keep getting a message box asking for the ID (key field) from the base table.

If I type * in the box (to denote all values) and press enter I get the results expected.

View 4 Replies View Related

Forms :: Copy Specific Fields From Selected Record To Specific Fields In Subform?

Jul 9, 2015

I am new to access i have a problem which is i have made a form which contains a subform and a read only subreport, what i want is the ability to select a record in read only subreport as in the picture attached and make a button that when i press on it, it should copy the values of the itemsID field, Packing field, ContainerNo field and origin field from the selected record and then paste them in the subform below.

Also i want to add more then one item, so the when i press on another record it should paste the values below the first record.

View 12 Replies View Related

Hello, .... And Help Please With Forms And Fields

Aug 29, 2006

Hi All,

I'm new here as I have only just started to use access :rolleyes:

I am just creating a very small and simple database (one table, five fields) for personal use.

My question is this:

I have a text field called [rank] which is a list of predefined texts eg "level1", "Level2" etc etc up to "Level9".

I have a form created to edit all the fields (which works fine) however I have created a button which I would like to do the following but don't know how to set it up :confused: .

When the button is pressed I want to automatically 'promote' the above field. ie if it is at "Level9" it changes it to "level8", or if its at "level2" it changes it to "level1" for all the different levels (if its at "level1" it shouldn't do anything)

Thanks in advance for your help :)

View 5 Replies View Related

Lookup Fields In Forms......

Feb 12, 2005

I am working on a project that I know I am making more difficult then it need be...... Maybe because I started with a form and tried to build everything else around it. The database looked bad...... Now it looks good... normalized as I can see it... But trying to get the information in is being difficult.
The DB has customers, thats no problem. These customers have inspections done to areas for cleaning.
I have done the areas in a drop down, in one table, and the task to be rated as a dropdown in another table. Then finally a rating table....1 to 5.
It is very easy to go in in datasheet view and input the info for each area, then pick a task from the next dropdown and then pick a rating from the final.
Problem is this won't be as easy for someone else to input. So here is the form problem.
Heres how I would like to lay it out. An over all inspection form. Areas inspected and rating (average)
I will use a command button from the main form to open up say "area1"
On the area one form is the first problem....
I want 6 different task to give a rating to...... But these task are on a dropdown....so I can not bring over the field more then once.... or I dont know how..It's getting confusing and I don't think it should be.... its a pretty simple one.
So can anyone guild me to a databse similiar to this? I need to see how one like this is done.

Thanks

View 1 Replies View Related

Blank Fields In Forms

Oct 26, 2005

I am setting up a form with a few tables in it.

I want each table to relate to the form.

When the Next button at the bottom of the page is clicked I want all the values of each table recorded even if there were no values put in the boxes.

For example if there is no value added to the field boxes in say half the tables I want the default value to be recorded as blank or zero so that each table has the same Autonumber associated with the other tables in the form.

What is the best way to do this?

s

View 5 Replies View Related

Enabling Fields In Forms

Nov 8, 2005

I want a form to default open in read only mode to avoid users deleting info. I want them to be able to edit the form by pressing a button. Does anyone know the VB code to run from a command button to do this.

Regards :confused:

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved