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
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.
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).
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.
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!
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
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?
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.
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....
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?
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.
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 )
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.
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
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.
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.
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.
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?
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.
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...
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?
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.
I have a main form that has two subforms, subform1 and subform2, both connected to the main form. When I enter data into a field in subform1 I want subform2 to requery and update to show the calculated results from the new or changed data in subform1.
I found that if I do a refresh it works when changing the data but not when entering a new line of data in subform1. I tried some code in the after update field of on subform1, but cannot seem to get anything to work.
Me.[subform2].Form.Requery
Does not work. It errors and says it cannot recognize subform2 as a field. I have tried a field name on subform2 but I still got the same error.