Forms :: Referencing A Value From Combo Box

May 31, 2014

How to reference a value on a combobox in one form from an object on another form.

I have put in =Forms![Company Name].Combo7 in the field object on the form and I have got the ID autonumber of the Company Name. So far so good. It worked.

When I put in =Forms![Company Name].Combo7.column1 to get the company name to appear in the field I got an error.

What is the correct entry that needs to be entered?

View Replies


ADVERTISEMENT

Referencing Data In Combo Box

Feb 3, 2006

Basically MY problem is that i set the control id to that of a primary key so that when the combo box data is changed it puts the data in the table. However my problem is that the data it displays is a price and im trying to calculate a total. Therefore in VBA im trying to find out how to refer to the data displayed in the combo box but isnt the control source.

Thank you in advance
Any help would be much appreciated

View 1 Replies View Related

Forms :: Referencing A Subform

Aug 12, 2015

I Open my Form

frm_process_ppl (single form)
which has the datasource as qry_process_ppl_2
on this form is a subform (continuous)
frm_process_ppl_orig

with the same data source linked by [ALINK].I want to run an append query when I click on one of the controls of the subform.On the subform there is a uniqueID called [LNK]

In the append query I have the following criteria for the LNK field [Forms]![frm_process_ppl]![frm_process_ppl2].[LNK]..However it is not working.I think my criteria is wrong.

(This worked fine with just one form but I have had to add an additional subform and the original form was continuous. I cannot add a subform to a continuous form so I decided to creat a single form to house the continuous form) I just cant reference what Im clicking in my query !!

View 2 Replies View Related

Referencing Controls On Forms

Mar 30, 2012

I have a main form, 2 sub forms, and 2 text-boxes on the main form. I have a search box now for the first subform. Works perfectly. Once the users filtered based on name, I want them to be able to select that filtered record which would filter another subform.

Right? ok.

My first attempt was to assign the ID that was selected to a textbox on the main form, then automatically requery the second subform based on that value. I used this way on my search box. I'm sure there is a way to go directly from clicking the value to requerying the second subform, but i don't know it.

That being said even the indirect first attempt isn't working. It all has to do with the ".", "!", and ordering of this stuff. It has to do something with Parent child, but beyond that I'm at a loss.

Code:
Me.[Collateral] = Acct_Reference_id
Me.[Navigation]![textbox] = Acct_Reference_id
...
'Me!Subform1.Form!ControlName
'Me!Subform2.Form!ControlName
'Me.Parent!ControlName

I did find this very useful site [URL] ...... It shows what code you can use depending on where you are and what you're doing. Even with that as a resource, i'm still at a loss.

View 7 Replies View Related

Sub Forms In A Tabbed Control - Referencing

Oct 19, 2006

I am trying to limit the number of records displaying in a subform [amendedLoans] by selecting only those records that have the same ClientID as the mainform [Customers] and the same loan number as the subforms parent form [ClientAccounts loan changes].[loanno].

I have no difficulty selecting records just using the clientid but as soon as I add the reference to the subform [loanno] field I get no selection of records. I suspect there is an error in the where clause for
[Amended Loans].Loan)=[Forms]![customers]![ClientAccounts loan changes].[Form]![LoanNo]) .

I have built the clause using the expression builder and have had many attempts all ending up with the same result. I'm now at a loss as to where to go from here....

View 7 Replies View Related

Forms :: Referencing Controls On Subforms

Oct 23, 2014

In the attached picture has a representation of my setup.

My main form has a listbox search form (taken from this site). The search results populate data in subform1.

In the detail section of main form has subform1 with 3 cascading combo boxes. I have queries set up that run the cascading combo boxes.

In the detail of subform1, I have subform2 with a combo box.

Today I decided to merge my search form and the other forms so I wouldn't have two pages. Everything used to work with no errors - but I can't figure out how to reference everything properly now.

I've tried every combination from here to reference things properly. Somehow, I'm missing something.

View 12 Replies View Related

Forms :: Referencing Labels In A FOR Loop

Apr 1, 2014

I want to be able to do something to several labels, e.g. make them invisible, using a FOR loop. They are all named similarly, with ascending numbers on the end, e.g. lblName20

Say I want to make lblName20 to lblName40 invisible. I need something along the lines of:

Code:
Dim labelname As String
For c = 20 To 40
labelname = "lblName" & c
labelname.Visible = False
Next c

Of course, that doesn't work, because it doesn't recognize the string as a label name. How do I go about this?

View 3 Replies View Related

Forms :: Referencing Text From Drop Down Via ID Number

Jul 8, 2014

I know this is simple, but I feel like Simple Jack this morning. I'm trying to take the text from a drop-down menu and use that as part of the form caption. However, the text is not what is bound, the ID number is.

View 4 Replies View Related

Forms :: Have One Form Referencing Multiple Queries

Jul 3, 2013

I have a form that I want to filter by different fields on different occasions. i.e., I might look at all records that have a review date of earlier than today on one occasion and I might look at all records that have a Yes in a Yes/No box on another occasion (date then being irrelevant.)

I have finished the form which has a query as it's Record Source.

The only way I can figure out how to accomplish my goal is to copy/paste the form with a new name, copy/paste the query that is it's record source, with a new name, and then put the criteria I want in the new query and make that query the new form's record source.

Is there a more elegant way I can do this. For example. I have a form consisting of buttons that I use as a Navigation Form. Could I, in the VBA that opens the form when I click on it's button, stipulate which Record Source the form would use?

View 3 Replies View Related

Forms :: Referencing A Subform From Main Form

Jun 24, 2015

I have a form and subform with the following names:

frmBasic
sfrmCustomers

I have a unbound txt field called txtCustName on the mainform
I want to populate this field from a field on the subform called CustName when the record is selected.

I also have an unbound combo box with the cust ids using the row source from the tables record source from the main form.

I tried the following Code:

Private Sub cboCustNum_AfterUpdate()
Me.Filter = "[Cust_ID]=" & cboCustNum
Me.FilterOn = True

Me.txtCustName = Forms.frmBasic.sfrmCustomers.Form.CustName
End Sub

This didn't work. So I put "= [Forms].[frmBasic].[sfrmCustomers].Form.[CustName]" in the control source of the text box on the main form I want populated.

The name doesn't appear in the field. I get #Name? in the field.

View 4 Replies View Related

Forms :: Referencing Form Element In BeforeUpdate Procedure

May 28, 2014

I have an issue with a BeforeUpdate procedure that I am trying to get working. I'm using simple elements here as this is a test DB, not the real one yet.

I'm trying to get the value from a Text Box TextData into a string cString. I've used a Dim statement to declare cString - I think the problem I am having is trying to get the actual data from the form. The error I am getting is:

Run Time error '2465'

Microsoft Access cannot find the field "|1" referred to in your expression.

The code I am using is:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim cString As String
cString = [Forms!FormData!TextData]
End Sub

(I've removed some code that is either comments or working since I have to retype things!)

The line cString = [Forms!FormData!TextData] is where the debugger highlights as the error.

View 3 Replies View Related

General :: Combo Box Referencing One Table - Inputting Value From Different Table

Jul 11, 2013

I am trying to use a combo box to select the Company in an input record form for my Transactions. In the Transaction table, each record contains the Company ID, but not the company name (I have a relationship with a Company ID primary key in a separate table that has all the companies information).

I would like to be able to select the proper company in the combo box and have the form save the value as the Company ID number with the rest of the input data in a record (it will then refer to the correct company name in the other table if I query it because of the ID key).

View 3 Replies View Related

Forms :: Referencing A Control On Access 2010 Navigation System

May 29, 2015

I have an Access 2010 Database frontend to SQL Server 2008 Backend. So far there are 3 Tabs in the Navigation System. The first one is the primary Data Entry form which has a tab control with 3 subforms.

Here's the problem. The database is designed to track potential members based on different types of Ads. The primary Data Entry form holds all of the demographic data for the person that called in response to an ad. The first tab has a subform to track how many times that person has contacted us. The second subform tracks which advertisements the person is contacting us about and the third tracks which Events that person attended. There is no correlation between contacts, Ads and Events.

On the Advertisements we have about 7 different types of Ads we do and each ad can be run multiple times on different days. We want to be able to track which Ad the person contacted us about. The Advertisement subform has a comgo box for the Ad type and a combo box for the ad date. the source for the combo box for the ad date includes the combobox for the adtype as the criteria. That criteria is what's giving me the problem. I've used:

forms!mainmenu!navigationsubform.form!potential_me mbers!frmAdvertisements!cboadvid

Along with every other variation I can think of. The form itself is frmAdvertisements but I'm using it in a tab control and I also tried:

forms!mainment!navigationsubform.form!potential_me mbers!adv!cboadvid

View 6 Replies View Related

Forms :: Time Clock - Referencing Subforms On Navigation Form

Jan 15, 2014

I have a complete working timeclock and trying to add the forms within the navigation form. I know I have to go back and re-reference everything and have already done so with the queries. But I cannot get the setfocus to work.

Here is the setup.

NavigationForm (navigation form)
frmClockIn (top form)
frmClockIn_SUB (bottom form)
Open Navigation > Time Clock.
Select an EmployeeID from the dropdown
Click on clock in. (successful)
cboEmployeID goes blank and try selecting the same employeeID to clock out and I get a debug at

Me.frmClockIn_SUB.SetFocus

I think there is a problem with my cboEmployeeID_AfterUpdate() as well.(related?) which used to be
Private Sub cboEmployeeID_AfterUpdate()
me.refresh
End Sub

I have replaced "me.refresh" with "Me.frmClockIn_SUB.Form.Refresh"

(It used to break here, but not after I changed it.)

Not too sure where to set these forms to in the code

I have attached a blank copy ....

View 3 Replies View Related

Forms :: Referencing Input Information From A Continuous Form On A Report

Jul 1, 2014

The database I have created is to produce product description sheets. From the switchboard, the user clicks a button that opens a form on which they can enter about 5 bits of information , then select the product they wish to produce the product sheet for and when they click a button, the product sheet is produced. The product sheet is a report with a subreport. The information entered on the form is included with more information from the database on the main report and the subreport is based on a union query which combines information from 2 tables to list the items included in this product. (the information the user inputs into the form is information that changes depending on the situation and is not stored in the database.

Now comes the next step in this process. Just as the information input into the form is temporary information, there is also one bit of information that needs to be input on a temporary bases for the items that are listed on the subreport. Each of the items on this subreport needs an assignment of AAA or BBB that needs to appear in the subreport on the line with that particular item. There can be one item in an product, or there can be many and the listing of AAA or BBB can be different from one item to the next or they could all be the same. The assignment needs to be made on an item basis.

My thoughts on this were to have a subform appear once the user selects the product on the form which would list all of the items and allow them to select either AAA or BBB in a column on this form. Then when the click to open the report, those assignments would carry through to the report.I have been able to create a continuous form displaying all of the items based on the union query but that's as far as I can get. Not even sure if that is the way to go.

Is there a way to reference the AAA and BBB input on the subform I described so that it displays in the report.

View 7 Replies View Related

Forms :: Filter Based On Multiple Selections - Referencing A Control On A Subform

Oct 23, 2013

I have a multi select list box which I am trying to use to open another form and apply a filter based on the user's multiple selections.

List box - lstCatergories
Main Form - frmSuppliersSummaryCategories
Subform on Main Form - frmSuppliersSummaryCategoriesSubForm

The Subform contains the text box CategoryID

Here's my code which nearly works...

Code:
Private Sub cmdFilterSuppliers_Click()
On Error GoTo Err_cmdFilterSuppliers_Click

Dim strWhere As String
Dim ctl As Control
Dim varItem As Variant

[Code] .....

My problem is that the control "CategoryID" is on the subform and I'm having massive problems trying to reference it. This is the part of my code that won't work:

Code:
DoCmd.OpenForm "frmSuppliersSummaryCategories", acNormal, , "CategoryID IN(" & strWhere & ")"

However; if I open the SubForm directly it works perfectly. I.e.

Code:
DoCmd.OpenForm "frmSuppliersSummaryCategoriesSubform", acFormDS, , "CategoryID IN(" & strWhere & ")"

To summarise... How do I reference the control "CategoryID" on the subform "frmSuppliersSummaryCategoriesSubform"?

View 4 Replies View Related

Forms :: Referencing A Subform Controls From Another Subform

Apr 15, 2014

I have a form with four unlinked sub forms on - I am hoping to

1) add a value from one subform to another and more importantly

2) update 1 subform when the other is amended...how exactly do I reference subform 2 from subform1.

I have tried me.parent!form2 and forms!mainform!form2.requery etc but can't get it right

View 7 Replies View Related

Forms :: Referencing A Subform Control From Another Subform

May 27, 2014

On a main form i have a continuous subform listing Jobs.

On the Click Event i want to display the personnel and equipment separately in two additional subforms linked to the Job i have clicked on by JobID.

I have tried all sorts of references and currently have this:-

Forms!PersonnelAndEquipmentMovementFrm.PerEquipMov Jobs.JobID = Form!EmployeeSubform.JobID.Text

Which does not work?

View 4 Replies View Related

Forms :: Populate Combo Boxes With Values Depending On Selected Value In Previous Combo Box

Aug 5, 2013

I have several comboboxes (6) on my form.How to populate these comboboxes with values depending on selected value in previous combobox.

Example.Lets say that you select value "Audi" in combobox 1, then available values in combobox 2 should be "A4","A6","TT" etc. and if you selected "BMW" in combobox 1, then available values in combobox 2 should be "3-series", "5-series" etc...

View 1 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 :: Filtering A Combo Box On A Subform From A Combo Box On A Main Form

Apr 27, 2013

I have a Suppliers database which contains a form that will allow me to place orders with Suppliers.The Main form has a combo box that allows me to select the supplier. The combo box is called SupplierID with the following:

Row source: SELECT Suppliers.SupplierID, Suppliers.CompanyName FROM Suppliers ORDER BY Suppliers.CompanyName;

The subform is called Stock Subform witha combo box called ProductID with the following:

Row source: SELECT DISTINCT Products.ProductID, Products.ProductName, Suppliers.CompanyName, Products.Discontinued FROM Suppliers INNER JOIN Products ON Suppliers.SupplierID=Products.SupplierID WHERE (((Products.Discontinued)=0)) ORDER BY Products.ProductName;
Event Procedure - AfterUpdate: Private Sub ProductID_AfterUpdate()
On Error GoTo Err_ProductID_AfterUpdate
Dim strFilter As String
' Evaluate filter before it's passed to DLookup function.
strFilter = "ProductID = " & Me!ProductID

[code]..

The Link fields are done on the Purchase Order ID (PONoID).What I want to achieve is to select the supplier from the combo box (SupplierID) on the main form and then the combo box (ProductID) on the subform to filter to only show products directly supplied by the Supplier selected on the Main Form.

View 11 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 :: How To Filter Combo 2 From Table After Select Value From Combo 1

Nov 5, 2013

i have a table with three column Named

1-State
2-City
3-Customer

on a form i m placing 3 combo box for each column how can i filter combo 2 from table after select value from combo 1

View 1 Replies View Related

Referencing

Oct 3, 2007

I know this should be very simple, but I've already tried every possible entry from the site given in the FAQ section of this website (http://www.mvps.org/access/forms/frm0031.htm), but it keeps access keeps asking for a parameter value!!

i have a subform(frmSub2) on a subform(frmSub1) on frmMaster.
I have a combo box (cbo2) on frmSub2 that grabs its value from the value chosen from another combo box (cbo1). Here's what I have tried in the query builder (none work!! why?????):

-[forms]![frmMaster]![frmSub1].[form]![frmSub2].[form]![cbo1]
-[forms]![frmMaster]![frmSub1].[form]![frmSub2].[form].[cbo1]
-[forms]![frmMaster]![frmSub1].[form]![frmSub2]![cbo1]
-[forms]![frmmaster]![frmSub1].[form]![frmSub2].[cbo1]

Please help!!

View 3 Replies View Related

Forms :: Combo Box Value Based On Selection In Other Combo Box?

Nov 29, 2014

I'm trying to build a database for daily work. My work in daily basis I have to fill all condition for several items.

We have two areas, with two locations under each area, and three systems under each location and each system contain more than 500 items.

I created all tables and fill by all information:

1-Table 1: Area 1, Area 2, Area 3, Area 4, Area 5, Area 6.
2-Table 2: Location 1, Location 2.
3-Table 3: System 1, System 2, System 3.
4-Table 4: all items under System 1-1-1
5-Table 4: all items under System 1-1-2

[Code] ....

Last table will be LogBook which will be as follow:

date l time l area l location l system l item l Conition1 l Conition2 l Conition3

My question regarding to the form of the above table:

How can I make a combo box for area field and when I select for example area1 will appear only the locations which under area1 in location field, and when I select location1 for example will appear only the systems under location1 in system field, and when I select system1 one for example will appear only items under system 1.Combo box list will be based on the selection in previous combo box and so on.

View 3 Replies View Related

Forms :: Filtering Combo Box Based On Another Combo Box

Jun 3, 2014

I am trying to select a value from one combo box and on the basis of this selection the other combo box show only those values which have link to the value I have selected.

View 14 Replies View Related







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