Topics Search

Populate field in a table from another table...

Populate field in a table from another table...
Views: 18
And I am exhausted from looking over for the solution so I thought I would tap into the unlimited resource here. I have two tables tblProject and tblInvoice.

In the tblInvoice one of the fields asks for JobNumber. I would like to, based on that JobNumber, to look up tblProject for the corresponding ContractValue and auto fill a field in tblInvoice with that ContractValue.
Sponsored Links:

More topics

 

Populate table via form using data from another table

Preview
Instead of using a drop-down in a table I would like to populate the table via a form using data from an other table.

Example
I have a table with list of lab technicians (labtechs). I have a table (Process) with a process where I would like to add a field with the labtech but only from the list in table: Labtech.

Instead of making a drop-down in the Process table that links to the Labtech table, I would like to populate the labtech field in the Process table via a Form where I only have the choice of labtechs from the Labtech table. So basically I want a drop down in the form but NOT in the table.
 

Understanding relationships and auto populate...

Preview
It may help to understand what kind of tables I currently have in Access 2010.

I have an employee table that shows employees and some basic information about each of them. This table has an employee ID field that is not an autonumber but it is unique to each employee (10004928).

I have other tables that also use that same field and I want the first and last names to auto populate based on the main employee table. These other tables are tracking OT and Vacation time used.

How do I make the later tables auto populate the name fields when you key the employee ID?
 

10 steps to populate an Access list control using field-level properties

Preview
In this article, I'll show you how to populate a list control instantly by setting properties at the field (table) level to create a lookup field. A wizard sets a few field-level properties, and any form you base on that table will automatically populate a list control for you.
 

Populate fields using data from different tables

Preview
I know very little about Access but need to create a database for work. I was hoping there would be a way to select an id based on a previous table and have parts of it populate in this new table.

For example:

Table A - Webinars (Webinar ID, Webinar Title and Client)
Table B - Sessions (Session ID, Date, Webinar Title, Time, Facilitator, Session Occurred, Reason, Conference Call) [Webinar Title I used a look up field and just select the corresponding Webinar Title and it works nicely]
Table C - Users (User ID, Status, Prefix, Last Name, First Name, Email Address, Component, Role and State)
Table D - Registrants (User ID, Session Date, Webinar Title, Attended).

So in Table D I would like to add Role and Component, so when I select User ID #1 the Role and Component Field populate with the info based on Table C.

Does that make sense is there a way it can be done simply
 

Two ID fields with cross-populating Look-Up

Preview
So, the Person table has 2 IDs (neither is the primary key of the table, like SSN and HRID). What the customer wants is to show both IDs in the Orders table.

I'm having trouble getting the table to populate the second ID field based on what is selected from the drop-down in the first ID field.

Person table (ID, FirstName, LastName, SSN, HRID)

Orders table (ID, PersonSSN, PersonHRID, etc.)

If I populate the Look-up field of PersonSSN as 'Select SSN, HRID from Person' (use column 1 as value),
how do I get the HRID field to populate when someone selects a SSN value from the Person drop-down?

And the follow-up, can I get the same thing to happen in reverse (I.e. populating the PersonSSN value when the customer selects an HRID from the PersonHRID drop-down)?

I'm hoping someone understands what I just wrote,
 

How to populate a table with same item each time

Preview
I need to do the following task. I could do this with the help of excel, but feel that would be highly inefficient, cuting and pasting, backwards and forwards.I guess there would be a way to do this wholly (and easily) with Access ? Task. I have a large table of approx 250,000 rows. I need to add a new column (which I can do ! ), and then populate the new column with text, which will identical for each field. (Of course there is more then 1 table, which is where the inefficiency comes in).
 

DLookup only returning first value from table

Preview
I wonder if someone could help.

I am using a DLookup function on a command button to populate a field on a form with value from another table. However it only seems to populate the field with the top value from the table.

Below is the code

Private Sub Command111_Click()
Me.lngEncrpytion_Password = DLookup("[Password]", "[tblpasswords]", "EncryptionID = EncryptionID = '" < myknowngoodpassword &gt
 

Linked table query

Preview
I have two tables linked where Table A, field 1, is a look up table for Table B in Field 1.
Table A has 3 fields and I want to query Table B based criteria in Table A, field 2 and 3. SQL as follows

SELECT [Table A].[Field 2], [Table B].[Field 2], Sum([Table B].[Field 2]) AS [SumOfField 2]
FROM [Table A] INNER JOIN [Table B] ON [Table A].[Field 1] = [Table B].[Field 1]
GROUP BY [Table A].[Field 2];

I keep getting the error "You tried to execute a query that does not include the specified expression <Table B Field 2> as part of an aggregate function. (Error
 

Populating a field from another table using DLookup

Preview
I'm trying to populate a field (we'll call it field#2) on a standard form (Customer Record Card) automatically after I've selected the contents of another field on the same form (we'll call it field#1)

The content of field#1 is a pick-list lookup from a separate table. The other table also holds the look-up list I want to use to populate field#2. The relationship between fileds 1 & 2 is direct. Sounds simple ? It's driving me nuts.

I've tried using DLookup and I'm stuggling.

Can it be done using DLookup or another Built-in function or do I need more complex code.

Can anyone tell me what the syntax for the Dlookup function in the above scenario would be . and where should I put it ? "on click" "after update
 

Populate a field based on combobox selection

Preview
I would like to populate a (another) table field based on user combo box selections.

I would like a combo box with selections A, B, C, D, E, etc.

If combo box A is selected, it would populate with the numeral 1; if B were selected, it would populate with the numeral 2; if C were selected, it would populate with the numeral 3; etc.

So, we would have a combo box in the form, but it would not populate a table field with the combo box selections, but with values driven by the combo box selections.