Topics Search

Populate field in a table from another table...

Populate field in a table from another table...
Views: 22
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:

Similar posts...

 

Populate table via form using data from another table

Populate table via form using data from another table Icon
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...

Understanding relationships and auto populate... Icon
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

10 steps to populate an Access list control using field-level properties Icon
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.
 

Two ID fields with cross-populating Look-Up

Two ID fields with cross-populating Look-Up Icon
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,
 

DLookup only returning first value from table

DLookup only returning first value from table Icon
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
 

One field value determine value of second field in form?

One field value determine value of second field in form? Icon
In my database, I have a table that has a list of procedure codes as one field and a cost assigned to each procedure as a second field.

I have a second table where I enter one of the procedure codes (looked-up from my original table/typed in), and I would like the value associated with this code in the original table toauto-populate a second field "after update".

Is there a way to make this field pull from the same table as the procedure code is pulling rather than having to type hundreds of "If/Then" statements in VBA?
 

Create Access Table based on filenames in a specified folder

Create Access Table based on filenames in a specified folder Icon
I have a requirement to automatically populate a table based on the contents of a specified folder.

The file-names follow a protocol of the below -

180936-556849.doc

The extension can be different, e.g. docx or pdf, so the action would be to

1 - Find the directory
2 - Clear the access table
3 - Use code to populate the table with the split out file-name in separated fields.

So I'd need an end result that looked like -

Field Names:
URN/Comm_Number/File_Extension

Data:
180936/556849/doc

I'd found a database entitled Browsing.mdb from a user but it only displays the information as a report not as an auto populate to a table
 

Write Value to Form Field

Write Value to Form Field Icon
Almost feel like I'm cheating coming here to ask rather than doing all the research and homework myself.

Anyway, I have a button that calculates a value, and I want to then populate a field on my form with that value. I've successfully calculated the value (and have a msgbox to confirm it), but I'm not sure where to go to populate the field.

I know how to write and entire record into a table, but I don't want to go to all that trouble if I don't have to.

The table linked to the form is StudyData, the form is frmDataEntry, the vaule is NewWONumber and the field is WorkOrderNumber
 

How to populate local table based on ADODB.Recordset

How to populate local table based on ADODB.Recordset Icon
I am breaking my head since 2 days to get populate the local table using ADODB.recordset but can not figure it out.
I have a local table tblLocation_Local which I want to populate/fill with the back-end table tblLocation.

Both the tables have same structures.

[CODE]

I need to get tblLocation_Local populated using ADODB.Recordset method so that it will be faster for users to get data from the local (Static) table instead of being connected the times to the network.
 

Search a table for value and populate another table with the value?

Search a table for value and populate another table with the value? Icon
I have 2 tables and a form. Table1 "PriceIndexWidget"
Table2 "HistoryWidget" and Form "HistoryWidget". I want to use a Checkbox on the form to populate a field value in the HistoryWidget table. I understand that when checkbox w001 is unchecked it = 0 and I populate field "me.widget001" value to 0 in table HistoryWidget.

What I am trying to do is search the PriceIndexWidget table, field Part# for the value of widget001. Widget001 is Part# in table PriceIndexWidget. Then use it's value as the value for Me.Widget001 field on the form.

Code for Checkbox w001 on the form.