Forms :: Make One Field Dependent Upon Another
Nov 2, 2013
If I have a Form that is used to populate a Table can I make one field entry dependent upon another?
For example, if I have a field for Discipline (with values such as Mechanical, Electrical, Piping) and another field for Equipment Type (with values such as Motor, Gearbox, etc) can I set up the Form so that when I select Electrical for the Discipline, only electrical items (such as Motor) are available to select for the Equipment Type field?
Using the table below as an example, if I select Electrical for the Discipline field in my Form, when I go to select a value for the Equipment Type field the drop down shows only Motor and Fan?
Discipline
Equipment Type
Electrical
Motor
Electrical
Fan
Mechanical
Gearbox
Mechanical
Pump
Piping
DN 150 Pipe
Or, better still, can I set it up so that if I select Motor for the Equipment Type field, the Discipline field will automatically be populated with Electrical?
View Replies
ADVERTISEMENT
Dec 12, 2006
I have a database of purchase orders
Many of the purchase orders have a revision No against them, eg:-
Purchase Order No / Line No / Revision No / Value
1001 / 001 / 00 / £50
1001 / 001 / 01 / £100
1001 / 001 / 02 / £200
I am trying to find a way to write a query that will show me the actual value of the final revised value of each Purchase order line ie: the answer to above is
1001 / 001 / 02 / £200
Could anyone please help?
View 2 Replies
View Related
May 19, 2006
Access 2003
Database for tracking job search/applications
I have three tables: Job (includes employer, contact) and Contact (First name, Last name, employer), and Employer (Employer name)
Form.Job is the main data entry mechanism. On this form, I enter the job details. I select the employer from a combo-box that draws from the Employer table. I would like to select the contact from a combo-box that filters contacts and shows only those that match the Job.Employer selection.
:confused: 1. How can I make a bi-directional link so that a new entry in the employer combo-box creates a new entry in the employer table? At the moment, I get around this with a "New employer" button on Form.Job that just opens up the employer table, but there seems to be an updating issue - new names don't show up in the combo-box for a while
:confused: 2. How can I get the contact combo-box to show only contacts with an employer that matches the employer selected in the employer combo-box?
Note that I got this to work once by using a sub-form, but I don't really understand how (presumably Access defaults that did what I wanted), and I don't want to have to use a sub-form.
Ben
View 2 Replies
View Related
May 20, 2014
I have two combo boxes in my form. The first one has the option of selecting a or b. If the user selects a, the second combo box will have the options of c and d, if b is selected the options in the second one will be e and f. How can i do this?
View 2 Replies
View Related
May 10, 2013
I there a way to determine whether or not my checkbox within a form is ticked or not dependent on another value within a field?
I have a field called 'DaysRemaining' and another check box field called 'Expired'. I want the expired checkbox to be ticked if the value within 'DaysRemaining' is '<0' and unticked if '>=0'. Is there a way i can do this within the control source of my check box?
View 1 Replies
View Related
Jul 6, 2014
I want to create a different rowsource-query for a lookup field (field1) in each record in a subform. The rowsource changes dependent on the value in another field (field2) in the same record. How can this be done?
- I tried to change the rowsource-query in an eventmacro when the focus is set to field1, but this ofcourse changes the rowsource for all field1's and makes the allready selected values unvisible.
- I think I have to include the value of record 'field2' in the rowsource query, but i cannot find a way to include that value in the query.
Something like:
Lookup field1 in the subform contains this rowsource
- SELECT CUSTOMER.Id, CUSTOMER.AGE, CUSTOMER.NAME
FROM CUSTOMERS
WHERE (CUSTOMER.AGE= me![field2]);
me![field2] however does not function
View 5 Replies
View Related
Oct 24, 2012
I have a table called welding, I want to create a user friendly form for input. The database ultimately wants to go on share point so I am building it in the web database option.
One of the fields is called location, if the location is 'Field' I want 10 more fields to appear for data entry such as weld reason, rail temperature etc . If the location is 'Depot' I want these fields to be hidden as they aren't relevant.how would I do this?
View 14 Replies
View Related
Nov 23, 2005
Is there a way to make a field on a form dependent on what the user selects from 2 other cbo? By that I mean I would want the user if they selected in cbo1 Easter and they select cbo2 Regional President in the form field I would want it to auto return the name John Smith because in my table he is the Eastern Regional President. I am not sure if I can do this by query or is there an easy way to do this?
View 3 Replies
View Related
May 28, 2005
I am trying to put in a validation rule so that data in one field cannot be less than that in another.
e.g. i want to make a validation rule so that a phone call end time cannot be before the phone call start time.
Can anyone help???
View 5 Replies
View Related
Nov 21, 2014
I would like to display the value of a field [Name] based on the value of another field in the same Table [Position] in a report. My goal is to have a visual representation of data that changes based on the changes to the value of the [Position] field.
View 3 Replies
View Related
May 14, 2007
Hi. I'm unable to work out how to set up a query which will filter records according to what is returned by one control, but will also list all records if the value of the control is null.
Situation: I have a CONSULTATION table linked many to many via a CONSULTATIONLIST relation table to an ADVISOR table. (An Advisor may be present in any number of Consultations, and a Consultation may include any number of Advisors.)
I have a CONSULTATIONMANAGE form enabling the user to select an Advisor from the table ADVISOR via a combo box called SELECTADVISOR which returns Advisor ID (adID).
My CONSULTATION form, displaying the list of consultation records, currently has, as record source, the following query:
SELECT Consultation.*, Advisor.adID
FROM Consultation INNER JOIN (Advisor INNER JOIN ConAdList ON Advisor.adID = ConAdList.adID) ON Consultation.conID = ConAdList.conID
WHERE (((Advisor.adID)=[Forms]![ConsultationManage]![selectadvisor]));
This query correctly lists only those Consultations in which the selected Advisor was present.
Problem: What I also need to do is show ALL Consultation records if the user does not select an Advisor from the combo box.
Any help would be much appreciated.
Mat.
View 2 Replies
View Related
Nov 2, 2004
so i'm trying to create a report that only displays certain fields per record based on another field in that record. To clarify: [Type] is a numeric field holding either 1, 2, or 3. I have a function that is instructed to display (ie, change from not visible to visible) a certain combination of fields depending on the number in [Type] when the form is opened. I assume I would have to go through all the records individually (do loop until), but i'm not sure if this works in a report.
is there any way to have different fields displayed for different records within the same report??
Thanks
-Jason
View 4 Replies
View Related
Mar 4, 2014
Is it possible to use date dependent field names in a query?
I have this table and there are columns based on year and month (formate of names is: 2014,01) I need to select the columns of last month and then 4 months further down in history.
Is there a way to do that as the information in those columns I need to make calculations and graphs with.
View 14 Replies
View Related
Oct 4, 2006
I have 3 tables:
tblFunctionalArea
FAID, FAName, Active(y/n)
tblSubFunctionalArea
SubFAID, SubFAname, Active(y/n)
tblLinkFAwithSubFA
FAID, SubFAID
What I need is all possible Functional Areas listed on a form where you can click on active checkbox to activate that Functional Area.
Then on the next form I need Sub-functional Areas listed, but only those that tie back to Functional Areas that have been activated.
Is this at all possible to achieve? I really don’t know how to go about doing this. Do I need a form, or may be I need a subform? I'm at a loss.
Any help would be greatly appreciated.
Thank you.
View 9 Replies
View Related
Mar 16, 2005
Hi,
I've got a data entry form where orders can be created. Within this form there is a ComboBox which is used to search for items and stores the selected item ID in the Order table. However the field for storing the Unit Price relating to the selected item is currently manually enterable. Where as I would like this to be dependent on the item selected within the ComboBox and updated automatically.
At the moment I've added an extra colum to the ComboBox to retrieve the relevant Unit Price and I can show this in a normal seperate text box using '=Combo27.Column(1)' as the ControlSource.
How can I get rid of the text box and incorporate the code into the current UnitPrice field so as it inserts the relevant record (price) into the UnitPrice coloumn of the Order table?
Any help on this would be much appreciated!
View 1 Replies
View Related
Aug 18, 2015
I am attempting to open a website hyperlink, some of the fields contain https:// and some of them dont.
Code:
Private Sub Facebookbut_Click()
Dim Hyper As String
If InStr([TEAMFacebook], "https") Then
Hyper = Me.TEAMFacebook
Else
Hyper = ("https://www.facebook.com/" & Me.TEAMFacebook)
End If
Application.FollowHyperlink Hyper
End Sub
So far this does 2 things, it doesn't open any hyperlinks at all and continues to attempt to until the program is closed from task manager. Before I had this error it would open the hyperlink twice if the field does not contain "https" and the IF statement was passed to the 2nd option.
View 14 Replies
View Related
Mar 24, 2015
I have a main form that has 2 subforms. I have a field on both forms that I have marked as "Visible="No". Both are text box controls and I have made sure that both the label and the text box itself are marked "Visible="No". In the first subform, it works correctly, while on the second one, it still displays.
View 2 Replies
View Related
Oct 6, 2013
I've got a memo field on a form where the name is TextEXTRA
The Control Source for TextEXTRA is EXTRA.
I've got a box called BoxSHOW (Visible = No)
As I browse through records or find records, I want the box to become visible when there is something in the EXTRA field and become invisible when the EXTRA field is empty. This is what I've tried .....
Private Sub Form_Current()
If EXTRA Is Not Null Then
BoxSHOW.Visible = True
End If
End Sub
I tried many variations on the first line such as ...
Me.EXTRA "EXTRA" TextEXTRA
but I always get errors.
View 5 Replies
View Related
Jan 14, 2015
My form has a button that has a calculated field on it (a dcount(...)). When the button is clicked, a couple of conditions are checked and if all is ok, it runs the vba code. If the tests fail, it returns to the form without running the code. All works correctly, except that the dcount number has disappeared. I finally figured out that it is now hidden behind the button. How do I bring it forward again programmatically?
View 11 Replies
View Related
Sep 14, 2004
Hello All -
I think that my problem is best explained by an example.
In the first field the user chooses between two options for the reporter.
Field 1 - Reporter: Client OR Employee
If the user selects "Client" they have to enter an address, if they select "Employee" they don't have to enter an address.
So, what I hope is to create a form where if they select the "Employee" the address fields (address, city, state, zip) "gray out" and not accept any data entry.
Any help would be SO appreciated!
Thanks -
Amy
View 1 Replies
View Related
Aug 18, 2013
I have 2 combo boxes, one Categories and Products. However I have follows a tutorial and when I select the Categories, the products do not show even though the tutorial says it does. I have attached a copy of the DB.
View 4 Replies
View Related
Mar 21, 2014
I created a number of graphs on forms that graph GamesSold vs RDate. If a game has no sales, there won't be any data. Is there a way I can add a label that will automatically display "Game is not yet released" and make it dependant upon the graph having data, and invisible if it does?
View 2 Replies
View Related
Oct 21, 2014
I am designing a form based on specific criteria from a table. I have one table "country/region" showing: Country, Region, and then primary numeric ID. I have another table called "contacts" with more info. What I am looking to do is create two combo boxes on the form, one for country and the other for region which will pull from the "country/region" table and feed into the "contacts" table". When the user writes in the specific country, the corresponding region in the combo box next to it should update automatically.
View 1 Replies
View Related
Jan 14, 2015
i have a form that shows payments (checks) that have been issued. sometimes those checks need to be voided and i want 2 fields (Updated By and Updated Date) to pop up when the payment distribution field is changed to a void status.
payment distribution: "I" for issued and "V" for void
i've gotten the On Change Event to work with VBA when the payment distribution changes from "I" to "V" and the 2 new fields pop up but if i exit the form and go back in to look at that record, the fields are gone. Is there a way to make the fields permanently if the payment is "V" on the form?
this is what i have so far for the On Change Event:
If [payment distribution] = "V" Then
me.cmbo_UpdatedBy = True
me.txt_UpdatedDate = True
Else
me.cmbo_UpdatedBy = False
me.txt_UpdatedDate = False
End If
End Sub
View 3 Replies
View Related
Jan 17, 2014
Access 2010
windows 7
The database I'm working on stores product records. To support the user narrow down which product they want to use, the navigation form has a listbox that looks to several combox values to filter the records it displays. As the user selects values for additional comboxes, the list of products from the listbox is refined. What I would like to do is set the comboxes up so that they also have to check the listbox to determine which records they should display.
For example:
Comboxes: Customer, Species
Starting out the listbox shows all products. The user wants to find a particular product that is sold to "Harly Quinn's Crab Imporium". They select "Harly Quinn's Crab Imporium" from the customer combobox. The listbox updates to show only products sold to Harly Quinn. The database currently has this functionality. What I want to add comes next:
The user determines that there are still too many records being displayed in the listbox, so he/she attempts to refine the search further by selecting a species from the species combobox. Currently all species from the species table are selectable from the species combobx, meaning that if the user selects a species that isn't sold to Harly Quinn, that the listbox will show no records. What I would like the combobox to do is refer first to the listbox and determine which species are still viable options based on the records available from the listbox.
View 1 Replies
View Related
Oct 3, 2013
I have a question related to a textbox on a form.
In my table (tbl_data) I have a field named Rating. This can be anything from 1 - 10.
On my form (frm_input) I have a textbox (created using the wizard so at the moment I'll call it txt_Rating).
What I would like to know how to do is:
If the value in the textbox is 0-5 leave the background colour of the textbox white with black font.
If the value in the textbox is 6-7 turn the background colour pale yellow with black font.
If the value in the textbox is greater than 7.1 turn the background colour Red with white font.
View 3 Replies
View Related