Forms :: Populating Text Box Based On Combo Box - Separate Form

Aug 14, 2015

The main issue I'm having is trying to populate a text box based on a combo box selection. I've found threads on that - the twist that is throwing me for a loop is that I'm dealing with two different forms.

I have a main/welcome form with two combo boxes on it. Based on the user's selections in these two combo boxes, two different forms are opened for data entry. For instance, box 1 has A, B, C and box 2 has x, y, z. If a user chooses B and z, then form B and form z are opened. What I want is for a text box to be populated on one of the opened forms, not the same (main/welcome) form. In other words, when B and z are chosen, I would like there to be a textbox autofilled with "z" on form z.

View Replies


ADVERTISEMENT

Forms :: Populating Combo Box Based On Text Box

Nov 19, 2013

I have a text box that displays a name of a law from one table, based on that law name I want to populate a combo box with different options on how to comply with that law that come from a different table. The compliance options I need to pull in are different for each law. Finally I would like to have the selected option saved in the table the laws are coming from.

I have tried using a rowsource query [Form]![form1]![Law] for the combo box of law options but keep getting errors.

View 3 Replies View Related

Forms :: Populating Text Box Upon Selecting Multiple Items In Combo Box?

Nov 28, 2014

Now I have a combo box "cbo_items" and a text box "txt_selectedItems", I want to populate text field with items selected from the combo box, every time i select an item it appears in text box and to be separated with comma, so text box appears like this ( item1, item2, item3), and after finishing the whole thing the result appears in lable "lbl_result" as "total items selected: 3 items".

View 1 Replies View Related

Forms :: Find A Subform Record From A Separate Pop-up Form Based On Its ContractID?

Apr 24, 2014

I'm trying to find a subform record from a separate pop-up form based on its ContractID. When I click the button, I get the following error:

"A macro set to one of the current field's properties failed because of an error in a FindRecord action argument."

When I step through the code, it works just fine. Here is my code:

Code:
'Find contract
With Forms!frmContractForm.frmContractSub
.Form.ContractID.Enabled = True
.SetFocus
.Form.ContractID.SetFocus
DoCmd.FindRecord Me.ContractID
.Form.Business.SetFocus
.Form.ContractID.Enabled = False
End With

View 1 Replies View Related

Forms :: Search Form With Each Field In Separate Text Boxes

Dec 8, 2014

i want to search a phone number in contact information table with column names - number, name, address, dob, gender, f-name, m-name etc and show them in a form with each field in separate text boxes in access 2010.

View 4 Replies View Related

Forms :: Fill Text Box Based On Combo Box (not Using Columns In Combo Box)

May 21, 2014

I'm looking for a way to have a text box auto fill based on the selection of a combo box on the same form. I cannot use the method i find all over the internet of using multiple columns in the combo box and basing the text box on that because the combo box already has multiple columns being used to determine its own possibilities and other combo box possibilities.

I would really just like the text box to work like this, but im still kinda inexperienced in VBA...

If combo box is "F004-001", then text box is "237"
If combo box is "F004-003", then text box is "280"

I know how to add in an "after update" thing, but i do not know how to do If/then statements.

View 1 Replies View Related

Forms :: Populating Only Key Field Value Form Combo Box Selection?

Aug 10, 2015

In the Contacts Table there are two fields, the unique Contact ID key field numeric and the Contact Name. Like this:

Contact_ID; Name
1; Tom
2; Dick
3; Harry

In a form named "Selection" there is a Combo box that references the Contact table, and lists just the three names in the drop down (showing the Contact_ID is optional - I'm fine either way):

Tom
Dick
Harry

When the selection is made it will populate the field Contact_Ref the table called SelectedName.

Question: When the user selects the name I'd like the data populated in the SelectedName table to be the Contact_ID Value, and not the Name, so if Harry is selected the Value "3" would be saved.

View 3 Replies View Related

Populating Combo Box Based On Data In Another Combo Box

Jan 23, 2006

Hi all!

It's been a while since I've used Access, and I seem to have forgotten this.

I have a form which allows entry of Borrower's details. I have 2 combo boxes on the form.

They are:

cboBorrName
cboLoanSN

Once the user selects the name from the cboBorrName, I want the cboLoanSN to display all loans associated with the Borrower so that they can select the correct loan and add repayment details accordingly.

I have added the following SQL statement as the record source of cboLoanSN

Code:SELECT * from tblBorrower WHERE tblBorrower.fldLoanSN=[Forms]![frmBorrower]![cboBorrName]

I have also added the following code in the After Update event of cboBorrName

Code:Me.cboLoanSN.Requery

However, it doesn't work.

Can someone please help me out?

Thanks a bunch!

View 6 Replies View Related

Forms :: One Combo Box Based On Another Combo Box And Text Box Uses

Jun 4, 2013

I have been creating a form, based on only one table. Here I am displaying data as text boxes and subfrom from the same table. At the beginning, I was interested in controlling the display of the data according to the combo box (in this case is the PO number). Now, I would like to add another combox box which is the year (I have a column with the date, and also I have a column that shows only the years digits in my table) Also, I have a subform that display the data from the same table specifics records that I want. It means that I want to pick the year first, and then in the combox box of po number shows only option of that year, and hence the text boxes and subforms change accordingly to the two combox boxes.

View 2 Replies View Related

Queries :: Populating One Combo Box Based On Selection In Another

Jul 20, 2014

I can't quite get my code right for populating one combo box based on the selection in another. I didn't create this Access database but I've been asked to add in a second combo box that is based on the selection of the first combo box.

My first combo box is for Rohe (the location of the Maori tribe) and the second is Iwi (the tribe name). So my first combo box (Rohe) has Dvic_ROHE written in the control source and its row source code is:

SELECT tblLookUpValues.DatabaseFieldValue
FROM tblLookUpValues INNER JOIN tblFormQuestionLookUp ON tblLookUpValues.LookUpID = tblFormQuestionLookUp.LookUpID
WHERE (((tblFormQuestionLookUp.FormID)=2) AND ((tblFormQuestionLookUp.QuestionNumber)=75))
ORDER BY tblLookUpValues.DisplayOrder;

The combo box for Rohe (tribe location) is populated by a table named tblLookUpValues. The second combo box for Iwi (tribe) has Dvic_Iwi in the control source. I created a table named tbl_Rohe_Iwi_lookup that contains ROHE (a list of tribe locations) and IWI (the tribes). There are 12 tribal locations and another 10-14 tribes in each location.
The form that the Rohe and Iwi combo boxes are located on is called frmDeceased. This is the code that I attempted to write so that the second combo box (Iwi) is populated with only the tribes that are in the Rohe (location) that was selected from the Rohe combo box. But when I run the query it comes back with no results.

SELECT distinct tbl_Rohe_Iwi_lookup.Rohe, tbl_Rohe_Iwi_lookup.Iwi
FROM tbl_Rohe_Iwi_lookup
WHERE (((tbl_Rohe_Iwi_lookup.Rohe)=[forms]![frmDeceased]![Dvic_Rohe])) UNION select distinct null, null
FROM tbl_Rohe_Iwi_lookup
ORDER BY tbl_Rohe_Iwi_lookup.Iwi;

View 5 Replies View Related

Forms :: Text Box Based On Combo Box Selection

Dec 31, 2014

I am trying to auto populate the text boxes in the form based on drop down from the combo box. As you can see in the form Frm_Input, this works fine for FL, but for some reason it will not populate for Skill, Role, FLM and Location. The table it is linking to is Tbl_Names. Why as I have changed the column source?

View 8 Replies View Related

Combo Box Populating Text Fields

Jul 19, 2006

Hi All

Been having trouble setting up a combo box in a form that displays data from the same line in the table into a text box.

I am trying this with a memo field without any luck. I am using a 2 column query for the combo box, the first column contains the name and the second contains the requirements (memo).

I have put in the after update code:

Private Sub CustName_AfterUpdate()

Me!CustReq = Me![CustName].Column(2)

End Sub

Can anyone please shed light on what I'm doing wrong?

Thanks

View 3 Replies View Related

Combo Selection Populating A Text Box

Nov 13, 2006

Probably an easy one here...I have a series of cascading combo boxes where once the last once it chosen, I'd like some sales info to populate in a group of text boxes. What command would I use for this?

Also, I have a checkbox that I'd like to use to either enable or disable a textbox as well. Any ideas?

Thanks!

View 12 Replies View Related

Populating A Text Box Using Combo Box Filter

Nov 18, 2004

Hello,
This is my first time posting here and I hope someone can help me. I am not experienced with coding in access and only recently started using forms.

I am trying to create a text box that automaticly fills in once a selection is made in a combo box.

There are only 2 tables and 1 form I am working with. Table 1 has columns "code" and "bu". The second table has several columns, all blank, that the form fills in.

The combo box is working correctly, it displays all the "code"s. Once the code is selected I would like a text box to display the "bu" column.

Any suggestions are much appreciated.

View 4 Replies View Related

Forms :: Color Text Field Based On Value Of Combo Box

Feb 28, 2015

I have a table named ColorValues with the following three fields:

- ID
- MunsellCode
- RGBValue

30 fields from another table called Color_Analysis are linked to the above with one to many relationships (I've already thought of other ways to normalize data, but this is the most efficient, so no need to go into this topic).

Now, I've constructed a form for Color_Analysis and all 30 fields recording color are included as combo boxes bounded on the ID in ColorValues and displaying the MunsellCode for the user. I've also created unbounded text fields next to the combo boxes and want to use them to display the color that the user selected in the ComboBox. The question is how do I do this?

Essentially I need a piece of code that picks up the value of the combo box (this is essentially the ID in ColorValues), looks up that value in the ID column of the ColorValues table and uses the corresponding RGBValue of the same table as the .BackColor for the unbounded text field.

View 8 Replies View Related

Forms :: Populate Text Box From Table Based On Combo Box Value

Apr 17, 2015

I am trying to populate the text boxes in a form with data from a table based on the selection a user has made in a combobox. I am trying to do this through a DLOOKUP in the text boxes Control Source using the following:

Code:
=DLookUp("[upMobile]","tblRepName","[tblRepName].[repContactMobile] = " & Str([upRepName].[Text]))

in the form when viewing the data.

View 8 Replies View Related

Auto Populating List Box Based On Two Dependent Combo Boxes?

Mar 31, 2014

how to auto populate list box based on two dependent combo boxes.

View 9 Replies View Related

Populating A Text Field From A Combo Box Selection.

Apr 28, 2005

I have a combo where the list is populated with a bit of VB code to create a two field list. When the user selects the item they want from the list it displays the item in the combo box and should populate a text box in the same row with the value from the second column.

This combo is part of an orders subform and the user is selecting a product from the list which displays the product_name and the product_id.

The problem is that the product_id is not filled in and access returns the following error:
Run-time error ‘3101’:
The Microsoft Jet database cannot find a record in the table ‘product_table’ with key matching field(s) product_id.

This is the VB code that populates the list :
[code]
Private Sub comboCatagory_ID_AfterUpdate()
Dim sProd_description As String
sProd_description = "SELECT products_table.product_id, products_table.prod_description " & _
"FROM products_table " & _
"WHERE products_table.prod_catagoryID = " & "'" & Me.comboCatagory_ID.Column(0)
Me.comboProd_description.RowSource = sProd_description
Me.comboProd_description.Requery
End Sub
[end code]

What am I doing wrong?

Thx
Kev.

View 5 Replies View Related

Populating The Text Box’s That Relate To The Chosen Combo Box’s With The Sum Of A Cal

Sep 29, 2005

Hi, I'm in the process of building a program in access 2003 for estimating roofs, I've ran into a little problem, as described below. any suggestions would be very useful

Populating the text box’s that relate to the chosen combo box’s with the sum of a calculation.

In other words if X combo box is chosen (There are many combo boxes to choose from) populate xx text box with the sum of a calculation.

Refer to the print screen example of my program: http://www.roofmart.net/Rest.asp

Notice under the label felts the 15lb 36” felt combo box is chosen and it displays the value of 11 and next to the combo box is a text box that displays the value of 25 The calculation will be (11*25) = 275 this value of 275 must be added to the text box values that are being shown in the forms header under 30yr where it reads $4,606.80 and 40 yr $6002.80 only, this is because the 30yr comp and the 40 yr comp combo boxes are the only chosen roof types under the label roof types above the felt label.
Hopefully this makes sense.
Thanks -- Any help with be greatly appreciated.

View 3 Replies View Related

Forms :: Auto Populate Text Boxes Based On Value From Combo Box

May 16, 2013

I have a form called frmPO based on a table called tblPO One of the fields in tblPO is linked to the field idAddress in the table tblAddresses

The following fields exist in both tblAddresses and tblPO
Company
Address1
Address2
City
ZP
State

The form contains controls for these fields on tblPO. I would like to give the user the choice to either enter a shipping address manually, or selecting a preregistered address from tblAdresses. For this I would like a combo box showing the values of idAddress. I f a user selects a preregistered shipping address, I would like the form to fill the rest of the fields based on the value of this control.

My understanding is that I should set a BeforeUpdate event to set the values of the different controls, unfortunately my command of VBA amounts to 0.

View 1 Replies View Related

Forms :: Auto Populate A Text Box Based On Selection Of A Combo Box

May 24, 2013

I have two tables: tblWeightTickets and tblWasteType.

I want to create a form: frmWeightTickets, where a user can enter information and the data is stored in tblWeightTickets.

There are two fields in particular that I am working on ... "WasteType" and "Rate".

On the form, I want "WasteType" to be a combobox "cboWasteType" and when I select a type of waste I want the "Rate" textbox on the same form to auto populate with the rate amount for that particular type of waste (i.e. recycling, garbage, etc).

The Rate amount is located in the table: tblWasteType under the field name "Rate". How can I do this and at the same time store the information in the tblWeightTickets? I already have the combo box loaded with the types of waste - I just need it to populate the rate text box and store it in the Weight Tickets table.

View 11 Replies View Related

Filtering With 2 Combo Boxes And Then Populating Text/memo Fields

Dec 14, 2004

I have two questions.
I have a form with 2 combo boxes. The first pulls from a simple list. Once you make a choice, the second combo box is then filtered by the first. This works correct, except that once a choice is made in the first, the filter is locked. If you change the first combo box's value a second time it does not effect the second box. The query that I am using for the second combo box has two columns that pull the first 50 characters of a pair of memo fields. Quote: SELECT MSSS.SS_ID, Left([Application_Name],50) AS Expr1, Left([Description],50) AS Expr2, MSSS.Site_Code
FROM MSSS
WHERE (((MSSS.Site_Code)=[Forms]![Edit or Delete Requests]![Combo6])); These fields are then used to populate 2 text fields using an event procedure. Quote: Private Sub Combo10_AfterUpdate()
' Display Partial Application Name and Description based on choice
Me!txtApplication_Name = Me!Combo10.Column(1)
Me!txtDescription = Me!Combo10.Column(2)
End Sub This is working fine, but it starts the next problem.

I need to change the form to include the entire memo field into a text box. I was using the columns of the second combo box to fill them in. Since the combo box is limited to only 50 characters, i could only grab part of it. I am guessing there is a much better way to accomplish what I need, but I am too inexperienced with forms and vb to come up with it. Below are the fields I need from table MSSS
Business_Name
Application_Name
Description
Acronym
Level_1_Support
Level_2_Support
Escalation_process
Troubleshooting
Priority
Links
Modified
Disabled

Thanks in advance to any help!

View 5 Replies View Related

Forms :: Change Record Source Of Combo Box On Form Based On Another Combo Box

Mar 31, 2014

I have a form that currently uses a "catch all" table for listing available equipment to choose from for an equipment field. I call it tblEquipment. What I want to do is to make it so when I type a name in (1 of 35) in one field of the current record, the record source for the equipment field immediately looks at a different table that has equipment available only for that name. To do this I plan on making 35 different tables with limited data originally found in tblEquipment. I would call these tblEquipment1, tblEquipment2, etc. I do not use a sub form, nor do I want to.

So my questions are:

1) can this be done
2)If it can be done, how can I do it?

View 3 Replies View Related

Forms :: Populating Date Based On Criteria

Apr 8, 2013

I have a form in which I want to capture today's date when another field on that form is changed from active to Closed. In excel I would write an IF statement but can't get my head round what I would do in Access to achieve the same result. basically it's if (field name 'status')=(criteria 'closed') then populate field (date closed with 'today's date').

View 7 Replies View Related

Forms :: Text Box Not Populating

Jul 31, 2014

I am new to access but I am creating a form on access 2010 for a Pass Request. On the form so far I have two cascading combo boxes that work great so far. The problem is that once a name is selected from the second combo box(cboFullNames) I want a textbox underneath to populate(txtOrg). I have tried using requery and refresh but it never works. The only thing that seems to pull up the information is pressing the refresh button.

View 14 Replies View Related

Forms :: Populating Controls Based On Input In Others From Reverse

Aug 3, 2015

I'm using I have a secondary control being populated by an entry from another control. I was able to find the code I needed to do this using a combo box here in this forum.

me.txtDependent=me.cboPrimary.column(#)
(specifics changed to protect my company's paranoid view of privacy)

the code itself was showing up in the secondary control instead of any value. I found though that moving the code from the On Change event for the primary control to the On Current event for the form itself everything is working beautifully.

However, I have a different task now that I need to be able to accomplish with the same two tables but in the opposite direction. I suspect that I'm going to need to create a second set of controls and maybe even a second relationship or table to do this. To use a set of specifics that I think will get this point across, if I had a master table which includes a field for "City" and a secondary table, CityState, which contains both "City" and "State", and two controls, a combo box cboCityState to look up the specific City and a text box, txtState to display the State, putting the following code in the City combo box's On Change event populates a text box with the State when the specific City is selected, or putting it in the form's On Current event will be sure that State shows up in all the copies of a form when the form is used in a search and the City is not changed :

me.txtState=me.cboCityState.column(2)

What I need to do now is to set up a control which allows me to type in the State and have the results show all records that include that State.

I'm using this in a Filter by Form environment. I know the objections to this method and the benefits to creating a dedicated search form, but this method appears to be working well in all other ways for us for now. I have several situations within this form where I have one control showing up at the initial load of the form and at the beginning of the filtering process, allowing selection of multiple values from a long list of values in a list box, for instance, (using the On Filter event) and other controls showing up as a result of the filtering process, to display the selected criteria only, for instance (using the On Apply Filter event), so I'm aware of how to make this work if that's required. I'm thinking I may need to create a second control, something like txtStateInput, to accept the State search criteria and another, something like txtCityResults, to show the cities that are part of the resultant records.

View 5 Replies View Related







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