Forms :: How To Get Two Different Fields To Autopopulate When Select A Choice From Combobox

Jan 10, 2014

I am trying to get two different fields to autopopulate when I select a choice from a combo-box on my form.

I have a form called IncomeRcvdFrom, which takes its fields from the table "IncomeRcvd"

In the form, I have three fields that need to relate to each other and auto populate.

The first field is called "IncmType", which comes from a different table called "CategoriesList". There is another field called "IncmDescr" which also comes from the same table. The third field, called "Category" is a list box in that table that comes from another table called "CatType".

All three of these fields also are list boxes in the table "IncomeRcvd", where the source of these fields come from the "CategoriesList" and the "CatType" tables.

What I am trying to accomplish is so when someone selects an Account, or "IncmType", it auto populates the "IncmDescr" field, as well as the "CatType" field on the form.

So far, I have gotten the Account or IncmType and the IncmDescr fields to autopopulate each other, but the Category field either says "Name?", or I get the "type mismatch expression" error message. I also accidentally got the field to work one time, but it would only display the ID Key field and not the actual wording in the rows (i.e. Misc. Payment, Royalty, Rebilling, etc.)

I have checked my relationships, my control sources, and still can't get it to work.

View Replies


ADVERTISEMENT

Modules & VBA :: Displaying Specific Fields Of Data Set Based On Combobox Choice

Sep 19, 2014

I have a Table with 57 fields. I would like to display this table in a form as a subform, but only certain fields depending on what selection is made in a combo box.

For instance, if the user selects "Missing Information" in the Combo Box, then the form will show a few standard fields such as ID, Market, Sales Manager, and then some specific ones such as date missing information requested and date missing information received.

If the user selects another option, again the standard fields will remain plus a few different ones.

I have done much searching on this and feel like I am so close but so far. I have looked into controlling the record source of the subform, columhidden =false and a multitude of others. All of which may or in fact probably do work in this situation but I can't seem to put it all together.

View 4 Replies View Related

Forms :: Combobox Autopopulate - Query Parameter Is Not Popping Up

Oct 22, 2013

My database has comboboxes to autopopulate fields. These comboboxes have parametered queries for row sources so that the user doesn't have to go through a long list of IDs and to make the database more efficient in case it has to hold hundreds of records. They work the first time round but not after, when the comboboxes are clicked for a second time the query parameter is not popping up.

View 1 Replies View Related

Forms :: Autopopulate For One Of 8 Fields Only?

Mar 18, 2013

I have a Subform/Subreport that shows in a datasheet view. I hosts two (2) fields on it: "Job Performed" & "Details". The "Job Performed" field is a drop-down list. The "Details" field is a memo field.

What I am trying to do is, well, one of the selections in the drop-down list will ALWAYS have the same details - "Changed Oil & Filter". But all of the rest will vary constantly.

So my question is, can I make it so if "Monthly" is selected from the first (drop-down) field, it will ALWAYS populate the Details field with the words "Changed Oil & Filter" without affecting the other selections?

View 1 Replies View Related

Filled Text Boxes Based On Combobox Choice

Oct 20, 2005

Hi
I have been searching this forum for 3 hours for a solution, some come close others are pure gobble de gook to me.
I have on a form 1 combobox where a name is chosen, from that choice I would like the address, suburb, state etc automatically placed intheir relevant fields.
I have tried =DLookUp("[PropertyAddress]","tblProperty","[Property]") in the address textbox which will only bring up the first recod's address from the table, if I change the name in the combobox the address doesn't change.
What am I doing wrong, I have designing databases in Access for a total of 7 days now and have been going fairly well with some tips and code snippets from this forum but this has got me stumped.

Cheers
optidisk

View 2 Replies View Related

Select Query Based On A User Choice

Nov 13, 2006

Hi,

I would like to run a simple select query, where the CRITERIA is based on the user choice.
I have a form with a combo box, with a few choices, and a button that will trigger a macro with one query for now. I can store the choice in to a variable e.g. "town", using Microsoft VB code.
How can I transfer the variable to the CRITERIA field in the query, so whenever I chose a specific "town", my query will select the records for that specific town.
I want to use one query, and I don't want to have to "hard type the criteria in to the cells' query", but I would like to use a variable that can change and will be read it from the user choice through combo box.

If I am not clear enough, please let me know.

Thank you!

View 2 Replies View Related

Forms :: Combobox In Navigation Form - No Longer Select A Value

Apr 26, 2014

The combobox in the frmResellerOrders works correctly until I include it in the Navigation form frmMainMenu. Once I include it the navigation form it no longer lets me select a value. I have read numerous articles about using the
Forms!YourMainFormName.YourSubformContainerName.Form.YourControlName

However, none of these seem to mention when and where to use it. Do I put it in the query that the form is linked with or do I need to put it in my form somewhere? I have been trying to fix this off and on for over a week now. It is one of the last parts of my database that I need to get finished by Monday!

I have attached a copy of part of my database with some dummy data.

View 2 Replies View Related

Forms :: Populate Field When Select A Value From Combobox On The Form

Apr 24, 2013

In my quality control database QC techs will be entering in test results. Each quality control entry they put in will have a product and lot number it is related too.

My question is about making data entry easier for the QC techs. When two jobs are being run at once, the techs may have to alternate between which jobs they enter, meaning a different product and lot number. It would be frustrating for the QC techs to enter in a product code and lot number for every entry they make.

Can the lot number field be automatically populated when the tech selects a product? Basically, if the tech selects product A, can the last lot number value for product A automatically populate the field in the new entry?

Edit: Currently I have the "solution" of making two instances of the entry form with each lot number entered on the different one. This allows the QC Techs to use the CTRL+ ' to populate the last record, allowing them to quickly enter the product code, lot number, and date of the job they are working on.

View 3 Replies View Related

Forms :: Select Via Combobox - Make Numerous Controls Visible

Sep 18, 2013

I have a form where i select via a combo box if a product has been inspected, if it has, additional controls are then made visible.

If Me.Inspection_Completed = "Yes" Then
Me.Date_Inspection_Comp.Visible = True
Me.Date_Inspection_Comp = Me.Dateinsp
Me.Inspector.Visible = True
Me.Qty_Inspected.Visible = True
Me.OK.Visible = True

[Code] ....

I tried to put this in a function so i could call it on load, or on current etc, but cant seem to get it to work, apparently you cannot use the me. in a function.

View 4 Replies View Related

Forms :: Using ComboBox To Look-up A Multivalued Field And Select Items In Listbox?

Jul 21, 2014

I'm creating a Form called Pharmacy where I can select a [Diagnosis] from a combo box in the form. This combo box source references a table called tblDiagnosis where each Diagnosis also has a multi-valued field called [Indications].

The Pharmacy form also has a multi-select listbox with all possible Indications. I would like to write a VBA code such that when a Diagnosis is selected, the Indications for that Diagnosis are automatically selected/highlighted in the listbox on the form as well.

As such, by selecting a Diagnosis, all the indications attached to that Diagnosis will automatically be selected; however, if additional indications are needed, they can still be selected afterward.

I know that there is a function Me!Listbox.Selected(i) = True, where i is the row of the entry in the listbox. However, the i in the listbox does not correspond to the ID of the Indication. I think that if there is a way to select listbox items by name, that would be much more efficient.

The reason I have a listbox, is because this listbox of Indications then references another table called tblDrugs where all drugs that are approved for the selected indications selected are filtered and displayed.

View 1 Replies View Related

Query Different Choice In The Same Fields.

Dec 27, 2006

I am trying to create a query that capture all the possible choice of a fields and do some math on them. let me make it clearer.
I have two fields that i need to create a query from forecast type(backup, hardcore) and win percent(76 to 100, 50 to 75, 26 to 49 and 0 to 25).
Forecast type is a drop down that has the following choice hardcore, backup or could be null. Win percent is just a number fields holds value between 0 and 100. One of the criteria for the range of number is when either backup or hardcore is null.i need them to line up as rows or columns so they either look like this

row view

Hardcore
Backup
76 - 100
50 - 75
26 - 49
0 - 25


column view
[Hardcore] [Backup] [76-100] [50-75] [26-49] [0-25]

I am currently using six queries to get the values for each group then joining them to get the final results. the problem with this is the values wont come out correctly. I know there is an easier solution to what i am doing right now.
I need some guidance and help to approach this issue. This will be use in a report so hopefully this provide more alternative to solve this problem.

thanks in advance

View 1 Replies View Related

Some Newbie Queries About Choice Dependant Fields

Aug 7, 2005

I have a database i am playing around with in Access 2003

I should state im new to Access

Anyway i have a field with a dropdown menu with the choice of Yes or No

I want another field to be populated from an entry in the table Extras called ElectricityCharge but only when the Yes is chosen above

Had a look around and cant see any sort of If then type function or anything of that ilk, how can i do this ?

View 4 Replies View Related

General :: Custom Table Based On Users Choice Of Fields

May 15, 2013

I want to create a form where by the user can select the fields he requires and the table is created.

Example: I have a table of subjects like maths, english, french, chemistry etc,

The user can choose what subjects are available in that particular school and therefore a table is created based on the chosen subjects.

Is there any way it can be done even with vba?

View 4 Replies View Related

Forms :: Text ForeColor Of ComboBox Fields

Aug 27, 2013

I am working on a database project using Access 2010 and encounter some ComboBox text color problem,

The form has a ComboBox that displays the Supplier Name. The Combo's source control is Supplier ID in the Products table which joints the Supplier Table containing the Supplier Name. To display the Supplier Name only, I use a column count of 2 (for VendorID and VendorName) and column width of 0";2" so as to hide the SupplierID.

VBA is used to dynamically change the ForeColor and BackColor (via the Control Property ".ForeColor" etc) of the text in the ComboBox and TextBox. This works well for all TextBoxes and the ComboBoxes with direct data from the Products Table. However, for the ComboBox of VendorName, the BackColor can change but the ForeColor always remains as black. I have tried using the Format query such as "[White];@;[White];@" which works on the TextBox and other ComboBox (with direct field data from table), but the situation remains the same on this ComboBox which uses join-table reference via the VendorID.

View 3 Replies View Related

Forms :: Selecting Fields In A Combobox Where ID Matches

Nov 24, 2013

In my Patients table i have a field called PatientID (AUTONUMBER) as my primary key I hve another problem. Is this possible as i hve been trying for two days now. I hve tried a lot of ways but i cant get it to work right. I have a table called dependents. ID , PatientID,,Dependents,DOB,Age id being the PK AND PatientID as a number I have a table called vitals. with ID,PatientID,PatientName( which is a dropdown of Dependents), hpp,sats etc. (This is a subform in datasheet style in another form)

In my table vitals i have the follwing for PatientName . comboxbox.

SELECT Dependents.Dependents, DateDiff("yyyy",[DOB],Now())+Int(Format(Now(),"mmdd")<Format([DOB],"mmdd")) AS Age FROM Dependents;

So it selects fine in a dropdown like John 48, smith 36.

The problem i have is that it selcts all the records irrespective of PatientID.

View 14 Replies View Related

Forms :: Enter Data To Subform With Autopopulate

Jun 24, 2015

I know the way to SELECTDISTECT on a combobox referring to a table so the value will autopopulate in the combobox. But is that doable in a subform?

I have a table with 3 columns. First Name, Last Name, Relationship.

I want to let the user adding data directly to the subform, but when typing RICHARD in the first record of First Name, then on the second record, when they type R, it will suggest RICHARD, a kinda auto fill if desire.

View 11 Replies View Related

Forms :: Select Record From Combobox List And Have Record Populate In Subform

Sep 16, 2013

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.

View 8 Replies View Related

Forms :: Place Values Of A Concatenated Combobox In Respective Fields

May 15, 2013

I have a form in which I have a combobox. The code in the row source is:

Code:
SELECT [tblBooks].AuthorFirst & " " & [tblBooks].AuthorLast AS Expr1 FROM tblBooks GROUP BY tblBooks.AuthorLast, tblBooks.AuthorFirst HAVING (((tblBooks.AuthorFirst & " " & tblBooks.AuthorLast)<>"") And ((Count(*))>1)) ORDER BY tblBooks.AuthorLast, tblBooks.AuthorFirst;

This is an unbound box.

The rest of the form contains bound textboxes and other bound comboboxes.

This form is processed by the following VBA code:

Code:
Private Sub cmdAddBook_Click()
'Place the authors first and last name in an array
splitAuthor = Split(cboAuthor.Value, " ")
'Create a new record with the form information
DoCmd.GoToRecord , , acNewRec

[Code] ....

What happens is that it places all the records (Except those in the array) in a field and overwrites the values in that field.

I have used the same GoToRecord statement on other databases and it works just fine. I suspect that it is due to the unbound combobox.

What I need to find a way to place all the data in the corresponding fields of a new record including separating the author's first and last name when retrieved from the combobox. I just need to figure out how to get the data in the table somehow.

View 2 Replies View Related

Forms :: Timesheet Database - Combo Boxes In Header Autopopulate

Dec 16, 2013

I'm trying to create a timesheet database to keep track of employee hours worked. I have my tables set up as follows...

Employee_T
PK -EmployeeID
PositionTitle
Last Name
First Name
Employer

Projects_T
PK-ProjectID
ProjectNumber
ProjectName
WBS

Timesheet_T
PK-TimesheetID
FK - EmployeeID
FK - ProjectID
Sat
Sun
Mon
Tues
Wedn
Thurs
Fri
WeekEnding

My question is on my input form I want to have the user/employee pick his name once in a header combo box as-well as the week ending date and have it populate to every new record that user input (each employee can charge to multiple projects in a week so I want to eliminate the need for them to pick their name and week ending date everytime they select a different job charge.)

John Doe Week Ending 12-20-2013

M T W TH F
Landscaping 8 4 3 2 6
Roofing 3 5 2 1
Plumbing 1 4 1

View 6 Replies View Related

Forms :: Single Column Combobox To List Values From Multiple Fields

Apr 8, 2013

I have a data base with names, email IDs, phone numbers of 5 types(example quality, security, IT,finance etc) of person from ten different project teams. I created a basic form for the end user to enter values and created fields for each of the person's name, email ID etc based on the personal type( liek quality, IT, finance etc) on each team. The background table contains records of almost 200 people now.

All of these people will be trained for one task and some will be trained for multiple tasks. I know how to make the combo box allow multiple values/selections but, i cannot list out all 200 personal names in the combobox's rowsource/value list. Is it possible to combine all different name fields and list out all personal(of one team), so that the end user can just select multiple names for that team who have been trained and so on. i need to set the rowsource of the combobox to the values of all personal from one team so the team leader can just go select who has been trained and who has not.

View 1 Replies View Related

Forms :: Populating Records From A Choice In Lookup

Jun 14, 2013

When adding a new project to the DB (through forms, not tables) when we get to the Client Company, I have a look up menu for previous clients (many of which will be reused) and when I click on the company, I would like the information to auto populate the client company info (address, city, state, phone, etc.) form. The whole point of the look up is to not have to re-enter information for the same company over and over. However, if there is a new client company I will be able to fill that info in myself to be added to the table.

View 4 Replies View Related

Forms :: Display Image Based On A Field Choice

Feb 27, 2014

I am trying to show an image on a form based on a user choice from a drop down box. For example, the user needs to choose a priority for a task. If the user chooses "Immediate" I want an image of an exclamation point to show up to draw attention that this is important.

View 2 Replies View Related

Forms :: Set Date Depending On Choice From Combo Box / Option Buttons

Mar 30, 2015

I'm looking to have either a combo box,, or 2 options buttons (whichever is easiest) that set a date field based on what is selected in the combo box/ option buttons.

The variables are 'Payment in 30 days" " Payment upfront"

if "payment in 30 days" is selected the date field on the form will enter the date as + 30 days from todays date
if "payment upfront" is selected the field on the form will enter todays date.

This date field must be blank unless an option is selected, as this information is only entered in a later stage of the form.

I've tried a few different ways to enter this but i can't quite get it to work as i want.

View 3 Replies View Related

Modules & VBA :: Date Field To AutoPopulate Other Date Fields To Future Date

Oct 24, 2013

I'm trying to get my "IncidentDate" field to autopopulate two other date fields to a few days from the "IncidentDate". The other two date fields are "ContainDueDate" and "RootDueDate". I'm trying to accomplish this on my "Test CAP Form"

I tried using the following in the BeforeUpdate of "ContainDueDate" and received a complier error: expected =

Code : DateAdd(d,2,[IncidentDate])

so I removed the parenthesis and nothing happened

Code : DateAdd d,2,[IncidentDate]

I even tried redoing it in the AfterUpdate of "IncidentDate" and nothing happened either

Code : DateAdd d,2,[ContainDueDate]

I'm not sure if I'm even using the right function to get what I want.

View 4 Replies View Related

Forms :: Update Record Based On Combo Box Choice And Related Tables?

Jun 3, 2014

In my database I have a table that keeps track of a package of items. The package is assigned a package type (counter display, end cap, half pallet, full pallet for example). The record of the association of the package and it's type is held in the main table.

Each of these package types is either a case or a pallet (counter display and end cap are cases and half and full pallets are pallets) This relationship is kept in another table (we will call it description table).

Now, based on the type of package and therefore it being a case or pallet a UPC and a GTIN number are assigned. The GTIN number is different if it is a case or is a pallet. I have a table that stores all of the UPC and GTIN numbers available in 3 columns, one for UPC, one for GTIN Case and one for GTIN Pallet (the UPC is a standard 12 digit and the GTINs are 14 digit -with the first 2 different to designate pallet or case. and all are based on the check digit formula necessary)

The user assigns the UPC and correct GTIN number by clicking a button which applies the next available UPC code to the package and determines if the description of the type (case or pallet) and inserts correct GTIN number into that field. I actually have all of this functioning correctly.

Now the problem. If a user changes the package type, and therefore changes the description, I need to add code to the update event of the combo box that gives the choices for package type that does the following:

Check to see if the original package type was a case or pallet (it's description) and if by changing the package type it is now changed to the other, update the record in the main table to the correct GTIN number based on the existing UPC Code.

OR as I write this, maybe the code could simply update the main table with the correct GTIN code based on the new description and the existing UPC code. This was I would not need to check for a change just do the update every time.

View 14 Replies View Related

ComboBox Auto Select

Apr 20, 2005

Hi i was wondering, i have two forms in my database.

On one of the forms when doing a combo box wizard i can select the option to "find a record on my form based on the record i selected in my combo box" but on the other form in the same database which i have it does not give me this option.... Does anyone know why this is so... Is it a relationship issue with all the tables???

If it is a relationship issue is there another way around this so i can do this option but without changing the relationships... Any help would be greatly appriciated...

Thanks Alot

Andrew
Xlr8

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved