Is there a function that will populate a field with drop down menu based on two criteria?I want the the fields with first and last name to populate with drop down lists based on the employee code I have inputted in the form and job title from a query.
Path: looks at employee code from form > looks at specific job title from query > pulls out all first names in one field and all last names in another field with the same job title in drop down list from query
Employee Code: 100
Returns all employees' first names in first field with same job title:
Prince
Tina
Greg
Returns all employees' last names in second field of form with same job title:
Fey
William
Jones
Here's what the query looks like in datasheet view:
Code:
Location # First Name Last Name Job Title Employee Code
1 John Smith Technician 100
2 Jane Doe Manager 100
2 Greg Jones Engineer 100
1 Prince William Engineer 100
1 Tina Fey Engineer 100
I've been trying to get dlookup to work, but no luck. Here's one of my formula:
The first is linked to a separate table that only contains employee codes because query I am working with has duplicates due to multiple records.The second is trying to link both the table and query together to populate only first name.how to include the second criteria, job title, to refine it more.
I am trying to do the following. I understand how to create relationships.However, when I create a field with a drop down selection (in this example Phone Number and Email) once that list item is selected I would like the column to the right to populate that information.So when Phone # is selected, the field to the right will populate a number for this individual.
Relationship: Customer ID is the primary key in Customer and is a foreign key in order table.
I need to create a Form with contains all the customer info from the customer table, as a drop down list. Once the customer is selected, all their orders should appear in a subform. At the minute I can get a form to work which shows all the orders but you have to go to the next record so see the order. For example it will say John smith and one order. The next record will be John smith again and their second order in the sub from.
I have used access in the past and I am fine with creating everything apart from the drop down. I am just a bit lost with the structure.
I have made a database. I have gotten to the point where I use a form to get the information. I am trying to get the information to auto populate fields after using 3 drop menus. They are department name, shop and shift. All of the information comes out of tbl department name, tbl shop and tbl shift.
I also have a table with department name, shop, shift, line, employee total, shift leader total, ratio of shift leaders per line and total employees off. I am trying to figure out once use the 3 drop down how can I Auto populate the remaining fields. Also I am trying to figure out where and how to put in the code.
I have built a form that holds details of training records. What I want is when a drop down is selected in the main form, that it will populate some of the fields in the subform. I have this working at the moment, that for example, when a certain course is selected, that their modules will appear in the subform. Where my problem arises is that I have a relationship between two tables that I want to appear on the subform, so that details can be filled in on the subform against the list of modules that automatically appear.
Is there a quick and easy (or not so easy) way to use Microsoft Outlook Address Book to populate a drop down combo box? I am creating a form that needs to pull in Business Process Owners, all of which would be in our corporate address book.
OK - I'm a bit of a novice at access and the answer to this may be very simple but any help would be much appreciated.
I have a problem getting a Combo box field in a table to link to another table and input a relevant value in another field of the same table. Here is what I've got:
Table 1 - Client Fields - CLIENT ID, CLIENT NAME
Table 2 - Client Rates (The rates charged to the client for 3 specific items that do not change) Fields - CLIENT ID, SC, LX, SX. (These last three are the codes for the items and the values in the field are the currency values for the items as they are charged to the specific client)
Thanks Table 3 - Job Details Fields - JOB ID (Autonumber for the Job), CLIENT ID (Who the job is for), ITEM (This is a combo box that selects between the items i.e. SC, LX and SX), RATE (I want this to recognise the item chosen in the previous field and display the corresponding rate for that item and for that client - This is my problem!) :mad:
I will attach the database as I currnetly have it so that you can see what I'm talking about. As I say - any help is muchly appreciated
In my list box I have two coloums, Surname and Christian Name, now can I get both names to go into a text field. I can get one of the names i.e surname or christian name by changing the bound coloum from 1 to 2. But I need both names to go across?
I have created a database which is used as a sign in and out machine for students. I have 2 forms a 'sign in' which has a lookup list containing all student names. as well as date and time and a 'sign out form' which uses a lookup list from the sign in form.
It collects data fine but when a student signs in and out a second time there name is duplicated in the 'sign out' drop down list. The student must select the right name out of the duplicates otherwise it wont record.
Im just wondering if there is some sort of fix to this.
Is it possible to have a drop down list dependant on the date selected? The form has date, then period time. Would it be possible for the period time drop down list to change if the date is selected on a saturday?
Hi all, i have a 2 fields in a subform named "HRS_ABSENT" & "ABSENCE_REASON" i'm trying to create some code that will display a message if the user inputs any number into the "HRS_ABSENT" field & leaves the "ABSENCE_REASON" field empty. I want to force the user to select a ABSENCE RESON (these are 3 letter codes) from the drop down list, if they enter a number in the HRS ABSENT field. Ive tried the below code but it doesnt do anything :-(
Anybody please help me out? ------------------------------------------------------------------------- Private Sub Form_BeforeUpdate(Cancel As Integer) If HRS_ABSENT = >0 & ABSENCE_REASON = FALSE Then MsgBox "Please select an Absence reason" Cancel = True End If
I'm trying to create a combo box that takes its values from a field in a table, the thing is that this field has duplicates because:
* The table is a qualification look up table * It has 3 fields: QualificationID (autonumber), Qualification(e.g. Bachelor), Programme (e.g. Science) * E.g of duplicate values (this is not a problem as it is necessary) Bachelor of Science, Diploma of Science, Certificate of Science
What I'm trying to do is create 2 single-columned combo boxes that are a parameter for a query and it's working except the combo boxes show duplicated valuesIs there a way to get the query that is the row source for the combo box to eliminate duplicates?
In my form's table (tblMain), I've got a lookup field (drop-down list) that lists the primary key field from a different table (tblDiff). tblDiff includes 3 more fields. In my form for tblMain, I want to include 3 more textboxes that get filled up with these 3 fields from tblDiff when the corresponding primary key is selected in the drop-down box.
I've got a field in a table that is a multiple drop-down list. In the form, I don't want it to be a drop down list, but I want the options in the drop down list to be checkboxes instead (not within a drop down).
I have three list boxes on a form (lstSubjectName, lstTargetGrName, lstCountryName). The list boxes are populated from queries based upon tables that have a many-to-one relationship to the main table. The queries are the following:
SELECT tblProjectSubject.ProjectID, tblProjectSubject.SubjectName FROM tblProjectSubject WHERE (((tblProjectSubject.ProjectID)=[Forms]![frmViewPro]![ProjectID])) ORDER BY tblProjectSubject.SubjectName;
SELECT tblProjectTargetGr.ProjectID, tblProjectTargetGr.TargetgrName FROM tblProjectTargetGr WHERE (((tblProjectTargetGr.ProjectID)=[Forms]![frmViewPro]![ProjectID])) ORDER BY tblProjectTargetGr.TargetgrName;
SELECT tblProjectCountry.ProjectID, tblProjectCountry.CountryName FROM tblProjectCountry WHERE (((tblProjectCountry.ProjectID)=[Forms]![frmViewPro]![ProjectID])) ORDER BY tblProjectCountry.CountryName;
The form is based on the main table (tblProjects). I want to re-populate/update the list boxes when the ProjectID on the form changes. I have tried to use a macro (ProjectID_AfterUpdate) for requery of the list boxes, but can't get it to work. Any other solutions? Thanks. Niels
I have a table with a list of Students. While the academic year is in progress those students are in an "Active" status. Once the year is finished those students are moved into (hopefully) a "Passed" status or some other status that is not considered "Active".
Throughout the rest of the database I have many forms that refer to the Student Listing. As an example we have a Test so we select the Student performing the test using a Drop Down List and go from there.
I have set search criteria to the Drop Down List via the Combo Box's Query to only display active students and it works fine during the Academic Year. However if I have to review a test from a previous year then the Student Drop Down List no longer displays the name but their ID# (Primary Key) because the Student's status has now changed and no longer meets the query criteria.
Is there a way to use the Filter/Search Criteria to chose from a listing of Active Students but once selected it will display the Student name regardless of their status?
I have drop down list linked to table included "agent names" , the names appeared normally in the form but not Alphabetic (A-Z) although the table was alphabetic .
I have a table of data which includes a date field and also various other fields which may or may not be filled with data.I'm trying to populate a listbox with the months for which this data is missing (a separate macro will then loop through these months to fill the missing data) But I only want each distinct month to populate the listbox - not each individual date.
Code: strSQL = "SELECT DISTINCT month([EntryDate]), year([EntryDate]) FROM [SampleTable] WHERE [ValueField] Is Null" Me.lstSampleListBox.RowSource = strSQL
I have a simple data entry form with drop down facilities on 2 fields. One of these fields incorporates a drop down list from a table but there are occasions when I wish to make a free text entry for the single record, but do not wish to add it to the drop down list.
I have tried to achieve this with a Combo Box but without success, although I am sure that I have read that it is possible.
You veterans have probably heard these questions many times, I've had a search around but couldn't find quite what i was after.
This is my first database.
I have 2 tables, one for customer details, and the other is products (holiday packages)
I have made a product form for staff to input new holiday packages. And for the customer form this is also the order form, so a staff member picks up the phone and gets customer details, name, ph, etc and then asks what holiday package they want. I want this to be a drop down list that always fetches all the packages availiable form the product table and when you choose a package it shows all the details on that package.
I need this all to be on the 1 form, if the staff member has to swap back and forth between customer form and product form to get info on a product this will severly hamper productivity.
If my question is abit hard to understand i can take screen shots of my tables/forms to get a better idea. And if someone can really help me finish this database off i'll pay them somethign for there trouble.
Trying to use some code to 'Select All' from a 'Check Box Drop Down' Multi Value Field . The table field size is long integer.
When trying to "Select All" the code returns a RTE 3163 "This field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data".
Private Sub cmdSelectAll_Click() Dim SelVals, i ReDim SelVals(0 To lkupAssignedTo.ListCount - 1) For i = 0 To lkupAssignedTo.ListCount - 1 SelVals(i) = lkupAssignedTo.Column(1, i) Next i lkupAssignedTo.Value = SelVals End Sub
Not my code, but just something I have found and trying to adapt. Tried changing the field sizes but no luck. Maybe something to do with declaring variables perhaps??
How to populate a list box using another list box on the same form. I have this working completely fine if the the source list box has the multi select property configured to be off, however I need it to be set to extended multi select.
I would like to select a record from my combobox dropdown list and have that record populate in my subform. Currently, I am only able to select the 1st record at the top of the dropdown list to appear in my subform. But I would like to select any record from the dropdown list and have it populate my subform.