Enabling A Button When A Text Box Changes
Oct 1, 2005
Hi all,
I was just wondering if it is difficult to enable a cmd button when a text box has been filled in. I have a button that allows users to add a file which displays the filepath in a text box. So what I wanted to do was when the path appears in the text box then this will enable the button. I thought that It may have been something like
Private Sub FilePath_Change()
cmdOpen.Enabled = True
End Sub
but as usual i was wrong lol
Anyone got any advice on this , thanks
J
View Replies
ADVERTISEMENT
Mar 14, 2007
Hi, I have a form called Product Details Display Form, which is for Product Details Display table. This form contains a button "Done" which saves everything into the table, or in other words, bounds the unbounded textboxes to the table. Basically, I want this button to be disabled at the begining, when the form loads, and when the user enters ALL the fields, it becomes enabled. Here is the code I have at the moment:
Private Sub Form_DataChange(ByVal Reason As Long)
If Me.Product_Brand = Null Or Me.Product_Code = Null Or Me.Product_Name = Null Or Me.List34 = Null Or Me.Price = Null Or Me.Details = Null Or Me.Discount = Null Or Me.Combo0 = Null Or Me.Combo2 = Null Then
Me.Command36.Enabled = False
Else
Me.Command36.Enabled = True
End If
End Sub
I also have Me.Command36.Enabled = False in the Form-Load. I dont really know if it has to be in Private Sub Form_DataChange or not.
Please help me ASAP
Thanx in Advance
View 4 Replies
View Related
Sep 11, 2006
Hi i have done this before but can not remeber how i did this.
Basically i am doing a report function where users can choose which type of report they want to print- i am decided to use a radio button function so user have to click on the radio button to enable which report they want to view
(see pic) http://img153.imageshack.us/my.php?image=radiobuttonstu8.jpg
Can some1 help me with the code i need to use so when a user clicks on the radio button one combo box is enabled and the other is disabled
Many thanks in advance
View 3 Replies
View Related
Aug 30, 2004
I have two text boxes and a check box - so the user can enter (1) patient weight, (2) patient height and then check whether the patient is male or female. The first two are then used to calculate a Body Mass Index. (simple enough and works OK). What I then want to do is have four command buttons that become visible when the calculation is within a certain range. So - simplistically- if the calculation (calctxtbox) is between 0 and 5 AND the patient is female then the command button called "normal"(Command79) is enabled.
My VB code writing is improving (thanks largely to this forum!) but still very basic - can some-one help please?
Do I put my code in the "after update" event of the calctxtbox?
Private Sub calctxtbox_AfterUpdate()
If calctxtbox > 0 (How do I say and <5) and then how do I say Female =Yes Then
Command79.Enabled = True
End Sub
Am I close?
Also can you enable labels and text boxes or just buttons.
View 4 Replies
View Related
Aug 16, 2006
Hi All
Looking for some quick help
I have a form made from the data in a table and what I would like to do is
if the data in one txt box = 1 than only the data1 text box would be available for edit,
if the data in one txt box = 2 than only the data2 text box would be available for edit,
and so on
below is the code I have entered on the on open event of the form
Private Sub Form_Open(Cancel As Integer)
If DataTypes = 1 Then
Data1.Enabled = True
Else
Data1.Enabled = False
End If
If DataTypes = 2 Then
Data2.Enabled = True
Else
Data2.Enabled = False
End If
If DataTypes = 3 Then
Data3.Enabled = True
Else
Data3.Enabled = False
End If
End Sub
Any help would be fantastic
Thanks
danson
View 3 Replies
View Related
Jan 17, 2008
I'm by no means an expert when it comes to using access and its many controls that are avaliable to use on forms. Thats why I've come here to seek your help.
I have a database that has been created by someone who has now left the company and it needs a little work done to it.
The ideal thing we would like to get working on form, is that we would like a number of options to be greyed out and only accessable when another option is ticked.
I'm not sure how to group these options together, nor an I sure how make them active only when an specific tick box is ticked. Any help would greatly appreciated on this matter.
Thanks for your time and patience.
Menes.
View 5 Replies
View Related
Mar 10, 2005
Working in the theatreworld, I'm trying to create something which will usefully combine my contacts and also a database of which shows we have done (dates, actors involved etc, etc) and what shows we have bought in.
So far, I have created my form which has the usual fields (name, address and so on) and also a field which asks users to describe what type of contact they are ie. are they an actor, or a director, or a theatre company.
There are also two command buttons, which will either open up another form which lists all the productions they have been in with us over the years (In-house productions), or one that opens up another form which lists what shows each theatre company has brought to us.
I would like to be able to select 'actor' in the category field which will then enable the command button for me to see what productions that person has been in. Or if I selected the 'theatre company' category then the other button becomes enabled.
Can anybody advise me on this please? Alternatively, if this all sounds far too convoluted, then I am open to suggestions!
Many thanks in advance,
Popps
View 1 Replies
View Related
Oct 9, 2005
I have code set up to disable a textbox by clicking on it (Yes, that right, I want the textbox disabled as soon as it is clicked on) with Me.Txt.enabled = false during the _onClick Event.
However, the with which I am working has 500 textboxes. Is there a way to call a function or something that would disable just the textbox that is clicked on?
View 2 Replies
View Related
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
Nov 26, 2005
what's wrong with this Code ?!
Private Sub Form_Current()
If Date = Null Then
Forms!getorder![Orders].Form.ProductID.Enabled = True
Else
Forms!getorder![Orders].Form.ProductID.Enabled = False
End If
End Sub
getorder is a Form
Orders is a Subforms
i want to do something that if i didn't entered a text in a date field hole subforms or Product id will be Disable
but if any texts enterd in Date Field it will be Enabled
thanks
View 1 Replies
View Related
Nov 28, 2005
hi, there is this form i want to create which uses a drop down list.... i want to be able to auto enable and disable selective fields upon selecting one of the choices.
e.g. in a drop down list containing: choice 1, choice 2 and choice 3
and there are the fields field no. 1, field no. 2 and field no.3
If i select Choice 1 --> field no. 1 get enabled and the other 2 gets disable... so on and so forth....
How do i go about doing this?
View 1 Replies
View Related
Jan 22, 2006
Hi, I have a field in a form that says when you are able to book a certain event, and i want the field in which the event can be booked, to remain unable to be edited until the tick box says yes. Is that possible?
Chris
View 4 Replies
View Related
Jul 11, 2006
Hi Guys,
I have just finished a DB in access, so I went into options and disabled all menus and shortcuts (I wanted to make it foolproof, this DB is for my mum!).
Anyway, it turns out that I wasn’t completely finished, and now I want to make a change to the DB. How can I do this?
Please view the screenshot, it shows which menus are/aren't enabled. I have explored all of the menus and I cant think of anything.
View 2 Replies
View Related
Aug 22, 2006
Hey,
In the form I am creating, I have checkboxes. Some of these checkboxes, when ticked, need additional comments entered into a comments box.
Only when the box is ticked, the comments box should appear/become enabled.
Any pointers in the general direction I should help would be greatly appreciated.
Thanks.
View 6 Replies
View Related
Jan 17, 2006
Hi - my first post on this newly discovered forum..
I hope you'll bear with me as I'm quite the noob concerning programming etc..
My question is simple, I know that there are some kind of program or plugin or whatever it is, enabling a user to input data into a MS Access Database without having MS Access installed. But what is it? where can I find it? and how is it done?
Hope you guys can help :)
(hope this is the proper section for this question, if not I'm sorry :o )
View 4 Replies
View Related
Jan 26, 2005
Hi all,
This is a simple question i think, but how do i enable my drop down menu to work for a combo box. I have a search query bound to a form and the combo box bound to a field of that query. At present my query just display the first record for any search result from my query on the combo box.
Thanks in advance,
M-.
View 10 Replies
View Related
Feb 17, 2007
I am trying to develop a customized program in MS Access,
but one of the input parameters needs to be a decimal or
fraction (ie: I need to enter values that are not whole number
integers). Unfortunately, it seems that MS Access won't
enable me to input values that are not whole number integers.
I had this same difficulty in the past, and in that case, it turned out that the non-integer value was not used. But in
the current program I'm trying to develop, I definitely need
to get the non-integer data inputting to work, since the
parameter that I'm entering these values for is "percentage".
It turns out that if I enter a value from 0.51 to 1, it rounds
up to 100%, and if I enter a value that's 0.5 or lower, it rounds down to 0%. There is no in-between. I tried looking
into the various settings in DESIGN mode, but nothing seems
to correct this problem. Is there anyone out there reading
this that has insight into my problem? Could my version of
MS Access have a software corruption? Or is there just a
setting that I've overlooked? I appreciate any advice that
can be offered. Thanks for your help.
View 3 Replies
View Related
May 16, 2005
Hi,
Is it possible to enable and disable fields on a form with another field that is a check box?
i.e. a text box is greyed out until a check box is ticked.
Any help is appreciated,
Cheers,
Phil
View 1 Replies
View Related
Jun 27, 2005
Hello,
I've recently been told how to enable/disable fields in a form by ticking/unticking a box. Is there a way that, on a tabulated form, i can only disable/enable the field for the same record as the one the check box is in rather than for every record?
Any help will be greatly appreciated.
Thanks,
Phil
View 2 Replies
View Related
Nov 8, 2006
Hi all,
Is there any way of enabling/disabling a number of text boxes/checkboxes, based on a combo box selection, for example:
Combo Box 1: Airport Selection
Combo Box 2: Customer Selection
Once the user has selected the customer, based on the airport selection there will be about 10 text boxes and a few checkboxes that I'd like to allow or "ghost" depending on whether we are contracted to carry out work for that customer.
Any help would be appreciated.
thanks, Graeme
View 2 Replies
View Related
Nov 19, 2013
The code I'm using should work, it doesn't, though similar code from a Text control does work. Basically, if someone selects "Other" I want [Chg_Type_Oth] to be Enabled and SetFocus.
The cmb_Chg_Type combo box, that stores into Chg_Type, has the following entries to select:
"Equipment New";"Equipment Modified";"Operator New";"Operator Move";"New Process / TTD";"Other";1
-I added "1" to see if that was the issue, but alas that didn't work either
Here is the code that isn't working (using two variations, just in case I was hitting an Access Wall, and the Select Case is purposely remarked out):
Private Sub Cmb_Chg_Type_AfterUpdate()
' Select Case Me.cmb_Chg_Type
' Case "Other"
' Me.Chg_Type_Oth.Enabled = True
' Me.Chg_Type_Oth.SetFocus
[Code] ....
Though this works fine from an ordinary text box:
Private Sub Chg_Name_AfterUpdate()
If Me.ChangeName = "Other" Then
Me.Chg_Type_Oth.Enabled = True
Me.Chg_Type_Oth.SetFocus
End If
End Sub
Anyway, I'm expecting something obvious will show up...
View 3 Replies
View Related
Mar 4, 2014
Basically I have a continuous form with each record having a textbox and a checkbox. There can only be one checkbox ticked per record but what I want to do is to stop the other checkboxes from being ticked if one is already ticked.
View 2 Replies
View Related
Jan 27, 2014
I have combo box in a form. I want to enable (to highlight) some controls in the form after selecting any value from my combobox.
For example, There are three values in the combobox. And :
When I select value1, I want an unbound combobox1 to be enable (This combobox is synchronized with a bound combobox2). So when this unbound combo is enabled, its synchronized bound combo should also be enabled.
When I select value 2, it should do the similar action on a different unbound combobx3 (which is synchronized with a combobox4).
View 11 Replies
View Related
Aug 6, 2013
I need to create a form to enter data from a survey, and ideally some sections of the form would only be completed when the answer to a first question is "yes". How to do this enabling/disabling of fields for data entry?
View 3 Replies
View Related
Oct 24, 2006
Hi everyone,
Firstly apologies for posting what is likely to a really simple problem and probably has been explored before. I have been looking through other treads but nothing that I could identify really fits the bill.
Essentially based on choices made against a combo-box, I wish to lock or hide combinations of fields/combo box within the form. Realistically I want to lock rather than hide.
All the fields/combo boxes in the form I want to effect are bound.
I can effectively do this as long as the fields/combo-boxes are unbound, but it seem to fail when they are bound.
Any assistance would be really helpful so thanks in advance.
View 3 Replies
View Related
Apr 14, 2006
I want Command Buttons to have Icon and Text both. ???
View 1 Replies
View Related