General :: Check Box Event - Lock Textboxes Depending On Each Record

Aug 30, 2013

I have a checkbox which when checked then turns textboxes to locked as below. However when I navigate to the next record which may not be checked the text boxes remain locked. I obviously want to lock the boxes depending on each record. I am navigating via the windows next/back record buttons. How do i do it?

Private Sub Check44_Click()
If Check44.Value = -1 Then
serial.Locked = True
gain.Locked = True
swst.Locked = True
Else
serial.Locked = True
gain.Locked = True
swst.Locked = True
End If
End Sub

View Replies


ADVERTISEMENT

Forms :: Lock Individual Record When Certain Check Box Ticked?

Dec 24, 2013

I want to lock an individual record when a certain check box is ticked so it can't be edited again. I've tried setting the form to read only when this check box is ticked on the form OnCurrent event, but this locked every record and I had to remove the code to untick the check box and be able to edit the record again.

View 2 Replies View Related

General :: 4 Check Boxes Trigger Another Event

Jan 23, 2013

Basically, I have progress table with learners and each learner must undertake 4 tests. Once they have completed each test, in the original learner table, I want it to show that they have completed the task if all 4 boxes are checked by it triggering one final check box.

View 2 Replies View Related

Forms :: Lock / Unlock Textboxes Based On Option Button?

May 11, 2014

I have a form with 2 option buttons on it one with year 12 on it and one with year 13. I have a simple form with drop down menus and text boxes allocated for year 12s and 13s. I want all of the year 13 text boxes and drop down lists to be locked if year 12 is selected and I want all of the year 12 text boxes and drop down lists to be locked if year 13 is selected. I do not want to over complicate the form by hiding parts of it or having a new form open depending on the option button selected.

View 9 Replies View Related

General :: Lock Record After Approval

Jan 26, 2015

Is there a way that when I field gets a password entered into a field the form can be locked so nothing on that record or subform linking to that record can be altered ...

View 7 Replies View Related

General :: Way To Get Access To Immediately Lock Record

Aug 15, 2013

I have a sales call tracking program.a list of available numbers are displayed to multiple users running the a user clicks on a record to get a call screen displayed with client info they then call the client and try for a sale.

the problem exists that two users can click on the same list record and open up the same call screen - they then both try to call the customer manually on the phone. one agent will get through the other will get a busy signal and record the call as a Busy Call. When the user with the customer is done he tries to record a Sale or No Sale and is met with an error message saying the record has been modified and they cannot save changes!!

I need a way to get access to immediately lock the record when it is clicked so only one person can open the call details screen? What is the best way to lock the records?

View 8 Replies View Related

Forms :: Update Textboxes With A Formula Without Using AfterUpdate Event For Each Textbox

Aug 24, 2013

I have a form with 7 types of weights (7 textbox rows) showing 7 weights in kgs and the others in lbs.When the user update any weight-kgs textbox, the opposite weight-lbs textbox will be updated automatically, and viceversa.Now, I'd like a fast way to code this action without writing the After Update_event for every textbox (they're 14).I have already setup textbox tags differently with "WeightKGS" and "WeightLBS", thinking about using "for each ... next" statement, but I have some problems to resolve what I want.

View 4 Replies View Related

Modules & VBA :: Disable Multiple Textboxes With A Check Box?

Dec 27, 2014

When UseDDelivery is checked the three textboxes should be disable and when the form is opened UseDDelivery is set to be checked by default so the textboxes should be disabled when the form opens but they aren't. the two different ways of doing it are shown below.

Elements specific to my system :UseDDelivery = checkbox
AltDeliveryAddress = textbox1
AltDeliveryTown = textbox 2
AltdeliveryPostcode = textbox3
Solution 1:

Code:
Me.AltDeliveryAddress.Enabled = UseDDelivery.Value
Me.AltDeliveryTown.Enabled = UseDDelivery.Value
Me.AltDeliveryPostcode.Enabled = UseDDelivery.Value

This is a bit of vba a friend wrote for me quickly, it includes all three textboxes but the checkbox enables them instead of disables.

solution 2:

Code:
Private Sub UseDDelivery_AfterUpdate()
If AltDeliveryAddress.Enabled = True Then
AltDeliveryAddress.Enabled = False
Else
AltDeliveryAddress.Enabled = True
End If
End Sub

With this bit of vba I found the checkbox enables the textbox instead of disabling it and I can't figure out how to include the other two textboxes

View 4 Replies View Related

Tables :: Combo Box And Check Box Showing As Textboxes

Aug 22, 2013

Today and yesterday I added new fields to a table and they are showing wrong when everything is right. I added yes/no fields and a combo box look up and when I drag them over to my forms they are just showing as textboxes and not a checkbox or combo box. When I look at the backend and look at the fields it clearly says it should be a checkbox or combo box. Iv done it the same way I always have and this time its just wrong.

View 5 Replies View Related

Modules & VBA :: Change Which Row In Combobox Is Visible Depending On Event

May 21, 2015

I have a combo box with three columns, the first one is the bound one, the second is text in English, and the third is text in Spanish. Currently when the form is open, both the English and Spanish texts columns are visible. What I would like to do is set up a command button on a different form that will open the form with just the English showing in the combo boxes, and another button for Spanish. I've tried the following code which opens the form, but the combo box is disabled altogether.

DoCmd.OpenForm "frmEditar", acNormal, "", "", , acNormal
DoCmd.SetProperty "niv_gest", acPropertyColumnWidths, "0;1;1"

What am I missing?

View 5 Replies View Related

Forms :: Check Box Depending On Day

Jun 10, 2013

I'm currently making a signup form for a 6day event.

Certain details are taken (Name, Age, Contact no etc).

I also have a registration form; so when someone comes back for the second day of the event I tick the 'saturday' checkbox, or 'monday', or whatever the day is...

When someone comes to sign up for the first time, I'd like the form to automatically check the box for that day (to indicate their attendance). This would save me opening two forms to signup one person, if I make sense.

So, when someone comes to register on a Tuesday, I fill in all their details - and then it automatically checks the 'tuesday' field box.

View 4 Replies View Related

Forms :: Check Box To Lock Control

Jan 12, 2015

I have a check box on a form,that when ticked ,Iwant it to lock that check box (basically i dont want that info altered after this time) I know its something to do with the property but cant get it to lock the check box).

View 3 Replies View Related

General :: How To Check The Record Count

Sep 11, 2014

1) If I check recordcount without move rst to last position I get wrong number of recordcount.

Code:

rst = CurrentDb.OpenRecordset(strSQL)
msgbox nz(rst.RecordCount, 0)

2) If I move rst to last position, number of recordcount is correct, but! If there's no record in my string I get an error that rst can't move to last position.

Code:
rst = CurrentDb.OpenRecordset(strSQL)
rst.MoveLast
msgbox nz(rst.RecordCount, 0)

how to check correctly RecordCount even if my query in string has no record?

View 5 Replies View Related

General :: How To Check The Record-count

Apr 3, 2015

1) If I check recordcount without move rst to last position I get wrong number of recordcount.

Code:
rst = CurrentDb.OpenRecordset(strSQL)
msgbox nz(rst.RecordCount, 0)

2) If I move rst to last position, number of recordcount is correct, but! If there's no record in my string I get an error that rst can't move to last position

Code:
rst = CurrentDb.OpenRecordset(strSQL)
rst.MoveLast
msgbox nz(rst.RecordCount, 0)

So the question is, how to check correctly RecordCount even if my query in string has no record?

View 2 Replies View Related

Modules & VBA :: Lock Check Box On Open Form

Jun 29, 2015

I'm trying to lock a checkbox when the forms open and depending if one has role as admin, it should unlock it.When I add the below code in the on open form I get error:

Code:
Me.lock_case_admin.Locked = True
Me.lock_case_admin.BackColor = 12632256

This is the part that should onlock if it is admin:

Code:
Me.lock_case_admin.Locked = False
Me.lock_case_admin.BackColor = 16777215

Maybe it is me, or the checkbox is giving the error that causes the dialogbox to open to to choose the ID nr.

View 5 Replies View Related

Check Box Is Checked Depending On A Data Field?

Nov 9, 2005

I have a data field (status) that is either Graduated, Terminated, or Current. I also have a report that has a check box representing each (such as a check box for graduated and another for Terminated etc).

I am trying to get the report to read the status and check the appropriate box in the report.

I have tried this in the control source of the checkbox
=IIf([status]="terminated";True;False)
but this does not work

I have also tried this on the OnOpen

If [status] = "terminated" then
termcheck = true
else
termcheck = false
end if
end sub

But this does not work either - what am I doing wrong :confused:

View 2 Replies View Related

Modules & VBA :: Append Query Depending On Check Box

May 5, 2015

I'm after a piece of code which works as described below.

I have a save button on a form

I have a append query ready to run.

When the save button is clicked, I want the code to see if a checkbox is true or not and if its true I want the append query to run if its not then I want the form to save and nothing else.

View 1 Replies View Related

Automatically Check Yes / No Box Depending On Data In Another Field?

Oct 9, 2012

I have a form (Access 2010) that we use to keep track of client data. When I enter a number equal to 6 or above in one field (Client Rating and this field is actually formatted as text because it could be 6 or 6a, b, c or 7 or 7a, b, c, etc), I want anything =>6 to automatically check a box in another field which is the Watch Indicator box (a yes/no box), how would I do this?

I tried to create an expression like the below on the Watch Indicator check box and it does not work - not sure why - it did not say it was incorrect, I think I may have it in the wrong place?

I used "After Update" on the Yes/No Box

=IIf([R Rating]<=6,Yes,No)

View 10 Replies View Related

General :: Check Or Validate If There Is Record In SQL Statement?

Mar 13, 2014

Payroll main form to post attendance record. Before I open the attendance form, I wanted to check if there is a record in the sql statement.

The code below produces error MS Acces object "Variable or With Block Variable Not Set"

Code:
Private Sub cmdPostAtt_Click()
Dim stSQL As String
Dim dbHBK As DAO.Database

[Code].....

View 3 Replies View Related

Modules & VBA :: Filter List Box With Combo Box Depending On Check Box

Jun 10, 2013

I have a form wich includes listbox of employees. When I click on them, it shows his or her data (date of birth,address,etc...). For every employee there are also three diferent checkboxes - if he is regularly employed, temporaly employed or student.So now what I need is to filter listbox of employees - only student or only regular or only temporar or all.I was wondering if I can do that with combobox, but I really dont know how. I am prety new to VBA.

View 13 Replies View Related

General :: Get Latest Record Added Of Item - Check Period Between Now And Date Saved

Sep 28, 2014

In my Access app I need to get the latest record added of an item from a MS Sql table and check the period between now and the date saved in the record.

So my guess is:
Select TOP 1 * from tbl_StockItems
Where StockId = Loc_StockId

I then need to check the days between tbl_StockItems.LastStockDate and Today.

How would I write an Access VBA query to give me the amount of days and put that number into a variable.

View 4 Replies View Related

General :: Persistent Data In Unbound Textboxes

Mar 24, 2014

There are hyperlinks throughout the database as well as a few lines of code that reference network locations that could change 1-2 years down the line. What I need to do is build a "housekeeping" form that is password protected where users can edit those hyperlinks via text-boxes. My problem is I'm not sure where to store the the data from the text-boxes to make it persistent. Making a table for the hyperlinks seems to be the wrong approach but I could be wrong.

Example:
Form1-Button1="String1"
String1="HousekeepingForm-TextBox1"
HousekeepingForm-TextBox1="X:Stuff"

View 8 Replies View Related

Enable/Disable Event Proceedure With Check Box

Mar 28, 2006

Hi, bit of a noob here. I've searched for a while but I can't find anything related.

I have a data entry form that auto recalls the last entry that was made in it. I did this in an effort to speed up data entry. Anyways, here is the code I use.

Private Sub Investigator_AfterUpdate()
Investigator.DefaultValue = "'" & Investigator.Value & "'"
End Sub

Now the problem is that I want to be able to enable and disable this event proceedure with a check box. Is there a way to do this?

Thanks in advance for all your help.

View 2 Replies View Related

Check To See If A Table Is Already Open On A Click Event

Feb 4, 2005

Some of the things that bring me screeching halt really surprise me. I swear, this sounds like it should be so easy....

What I need to do is check, when the user clicks on a button, whether a specific table that is going to be modified/deleted later in the click code is already open. If it is open, I will msgbox the user to close the table first and exit the sub.

Any ideas?

All help, as always, is much appreciated!

John

View 4 Replies View Related

Forms :: Event To Check Field Content?

May 11, 2014

I have a form with a number of fields and sections which change visibility based on the data entered in other fields,

The fields have an "on update" event to check the content of the field and make the appropriate changes,

I've changed this form to be able to edit records instead of "Data Entry" so now I need the checks to occur when the record changes as well as when data is entered,

How best can I achieve this without simply duplicating the code (which seems like a bad idea) into the "On Current" event?

View 3 Replies View Related

General :: Transfer Data On Textboxes From A Form To Report For Printing

Feb 6, 2013

I've written an application in VB.Net and now I need to transfer the data on textboxes on a form to a report for printing. Only the data on the form is what I want to preview and print.

View 1 Replies View Related







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