Enabled - No
Aug 14, 2007HI
Does anyone know a way to stop the text box going grey when you un enable it?
HI
Does anyone know a way to stop the text box going grey when you un enable it?
Have a number of tick boxes on different forms. When the form is opened the tick box appears to be greyed out however it is enabled. Is there any way that these tick boxes can appear enabled???
View 2 Replies View RelatedAfter some suggestions, I have a form with combo boxes, the combo boxes are set to enabled "no", but become enabled by an after update command on another field.
The after update command works perfectly, however once enabled I need to ensure data is selected, as opposed to leaving blank.
Any ideas on the best/easiest way?
Hi,
I am having a mare trying to do something which I think should be quite simple, as follows.
In a table I have the field [Entitled]. On my form I have this as a yes/no check box.
I have the following code in the VB.
Private Sub Check112_AfterUpdate()
If Me![Check112] = True Then
Me![Entitled].Visible = True
(or I could use) Me![Entitled].Enabled = True
Else
Me![Entitled].Visible = False
(or I could use) Me![Entitled].Enabled = False
End If
End Sub
Some people have the field checked and others do not.
The problem is; when I check or uncheck the box on individual records shown on the form, the value is remebered when I scroll to the next record (i.e. the box may be unchecked but the field is still visible/enabled). It is doing my head in! Help Please.
Mac
I have a form with many command buttons. This form is a master for a database that keeps time for my department. One command button is a setup button that I want the user to run once and only once. What code, and where do I put it will allow my to set the command button's visible or enabled to be false. Even when the user closed the database and reopend it, if the user has run the setup once, I do not want to allow them to run it again.
Thanks.
In a simple data retrieve/update form, how I can set a text field’s properties Enabled to No based on that particular record value?
For instance, there are 4 fields, employeeid, employeename, employeetitle, employeephone
I would like to set the employeephone text field’s properties Enabled = No, if the employeetitle is Manager
Can anyone help?
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 a form for creating a new database record for a list of "components".
One button "add_component" adds a new record.
One text input "component_input" allows you to enter in the "name" of the component.
One button "save_component" saves the record.
The component_input and save_component have their default "enabled" property set to "No" in their properties list.
I only want the component_input and save_component form objects to be enabled once the "add_component" button has been clicked. Once the "save_component" button is clicked, I want them to return to being disabled. This will prevent any accidental over-writing of records.
I have used "build event" for the "add_component" button...
Code:
if [macroError] <> 0 then
## errorMessage here ##
else
setProperty
control name: component_input
property: enabled
[Code] ....
And then I have used "build event" for the "save_component" button...
Code:
if [macroError] <> 0 then
## errorMessage here ##
else
setProperty
control name: component_input
[Code] ....
Now, this works when add_component is first clicked, however when I click save_component neither component_input or save_component become disabled again.
Hi Guys,
i have a problem i hope some one can help me with.
i have a form with a sub form on it, and i want to disable everything until the user clicks a 'edit' button to allow the information to be changed.
i am just testing it at the moment, so i set one text box's enabled property to false. then i added a button with an on click event with the following code:
Me!userid.Enabled = True
when i start the form, the userid box is disabled and when i click on the edit button, it enables it fine.
however, when i change to the next record, the userid box remains enabled. i cant find where to put the code to set it back to false everytime i change the record.
i should also let you know i am a beginner, so please be gentle!
I presently have a form that I have all the fields set as read only by using the enabled and the locked property of each field. However I have to be able to open the form to certain users with all fields enabled and unlocked. I need code that will run through each field and set the field's enabled to True and the locked to false. This code I will apply to a button that will open the form.
Cheers
I created a database which when macros are enabled the only thing visible on the screen is the forum. All tables as well as the ribbon bar is disabled. I also disabled right-clicking.
My issue is, for those who do not have macro's enabled, it opens up in design view and allows access to the left-hand tables until the user clicks the trust button at the top. Once trust is clicked, everything hides as expected.Is there a way to restrict access if they do not have their macros enabled?
im creating a form in design view but the icon to show the fields from the table that i want the fields to come from isnt being displayed; how do i get it to show?
View 2 Replies View RelatedI am using Office 2007 and trying to export a table in Access to a Macro-Enabled workbook in Excel. Unfortunately, when I go to export the table, my file does not show when I browse for the file and .xlsm doesn't look like it's a supported file extension. I have looked around and noticed others have this problem as well. One solution was to use save the Excel file as a 97-2000 file since it doesn't change the file extension based on having macros. However, I can't do this because then I lose functionality with tables and other things on my spreadsheet. I need the data in Excel to be updated every month. Is there any way to do this in Access? I'm going to explore using sharepoint. My DB options are limited to Access and Sharepoint. I don't have access to Oracle or SQL Server or MySQL etc.
View 1 Replies View RelatedI have several buttons on a form and I want to set enabled = false on one of them when I open the form - that's fine
I have two txt fields - ReceiptNo and BankPaymtId if the both have a value I want to make the button enabled = True
This is the code I have used on the BankPaymentId On Dirty event
Private Sub BankPaymentId_Dirty(Cancel As Integer)
If Me.[ReceiptNo] <> "" Then
If Me.[BankPaymtId] <> "" Then
Me.CreateOutlay.Enabled = True
End If
End If
End Sub
This is the one for ReceiptNum on Dirty event
Private Sub ReceiptNum_Dirty(Cancel As Integer)
If Me.[ReceiptNo] <> "" Then
If Me.[BankPaymtId] <> "" Then
Me.CreateOutlay.Enabled = True
End If
End If
End Sub
Nothing seems to be happening.
Even the Form on Dirty is not working now....
I have encountered a strange side effect. I am enabling and disabling several controls (the cludgy way-one at a time) depending upon the presence or absence of data in a field, using the oncurrent event to decide. It works.
But! It also moves some controls. Most of the controls stay put. But all four datepicker controls move to the upper left corner of the form when the oncurrent encounters the conditions that make these controls enabled. When they are disabled, they show up in the right place. When I navigate from a record where they are disabled to a record with data where they should be enabled, they are enabled but moved. When I navigate to a new record and all fields are enabled, but in their proper places. Any suggestions? Here's the code (* are the offending datepicker controls):
If IsNull(Me.Billed) And IsNull(Me.Paid) Then
Me.Categories.Enabled = True
Me.Project.Enabled = True
Me.Who_Are_You.Enabled = True
Me.Start.Enabled = True *
Me.End.Enabled = True *
Me.Billed.Enabled = True *
Me.Details.Enabled = True
Me.Paid.Enabled = True *
Me.btn_Billed_Now.Enabled = True
Me.btn_End_Now.Enabled = True
Me.btn_Paid_Now.Enabled = True
Me.btn_Start_Now.Enabled = True
Me.Categories.Locked = False
Me.Project.Locked = False
Me.Who_Are_You.Locked = False
Me.Start.Locked = False
Me.End.Locked = False
Me.Billed.Locked = False
Me.Details.Locked = False
Me.Paid.Locked = False
ElseIf IsNull(Me.Paid) Then
Me.Categories.Enabled = False
Me.Project.Enabled = False
Me.Who_Are_You.Enabled = False
Me.Start.Enabled = False
Me.End.Enabled = False
Me.Billed.Enabled = False
Me.Details.Enabled = False
Me.Paid.Locked = False
'Me.Paid.Enabled = True
Me.btn_Billed_Now.Enabled = False
Me.btn_End_Now.Enabled = False
Me.btn_Paid_Now.Enabled = True
Me.btn_Start_Now.Enabled = False
Else
Me.Categories.Enabled = False
Me.Project.Enabled = False
Me.Who_Are_You.Enabled = False
Me.Start.Enabled = False
Me.End.Enabled = False
Me.Billed.Enabled = False
Me.Details.Enabled = False
Me.Paid.Enabled = False
Me.btn_Billed_Now.Enabled = False
Me.btn_End_Now.Enabled = False
Me.btn_Paid_Now.Enabled = False
Me.btn_Start_Now.Enabled = False
Me.Categories.Locked = True
Me.Project.Locked = True
Me.Who_Are_You.Locked = True
Me.Start.Locked = True
Me.End.Locked = True
Me.Billed.Locked = True
Me.Details.Locked = True
Me.Paid.Locked = True
I have a form with four subforms set up in a tabs on the form. In the subforms I have a copuple of command buttons which enable/make visible fields when they are clicked (see previous posts but for eg) - if a height and a weight are added in two separate boxes a calculation is done and then a command button pressed to make visible the (label) which shows the mass index the patient falls into. My problem is that the label is then retained so if I click out of the form and re-enter with a new patient then the height and weight boxes are clear but the label from the previous patient remains.
I tried to put the code
Private Sub Form_Load()
If PtWeight = Null And PtHeight = Null And Text60 = Null Then
Label106.Visible = False
Label101.Visible = False
Label177.Visible = False
Label122.Visible = False
Label123.Visible = False
End If
End Sub
in both the open and on load event of the main form (not the subform) but it doesn't help. Any ideas?
(When should code be put on the main form and when on the subform?)