Autofill Data To A Main Table From A Reference Table

Mar 19, 2007

First of all apologies for the lack of proper terminology I'm a novice Ms Access user and I like to thank everyone in advance for trying to help.

Ok here is the situation:

I have two tables, NewJobs and Contacts which have the following fields.

Newjobs
--------
JobID (AutoNumber, Primary Key)
JobName
JobDate
JobDescription
JobOwner (Linked to table 'contacts' via LookUp)

Contacts
---------
DisplayName
EmailAddress
Department
Extension

Ok basically what I want is to have a form based on table NewJobs which will allow me to enter new jobs into the database. When I get to JobOwner a drop down list linked to 'Contacts' table will show me all the data from column 'DisplayName' and allow me to select it (saves time on typing). I have already done this and its not a problem.

Now I would also like in the same form to have additional fields from table 'contacts' such as EmailAddress, Department and Extension which will autofill with the right information soon after I select a JobOwner from the drop down list.

So for example if I select 'Joe Bloggs' Access will automatically fill the additional fields in the form with Joe's information (department, extension etc) from the Contacts table.

I hope all this makes sense. Thank you all for your support.

- Mitch

View Replies


ADVERTISEMENT

Can Excel Spreadsheet Reference Access Table For Its Data

Mar 27, 2015

Can an Excel spreadsheet reference an Access Table for it's data? Sort of like a vlookup, but instead of referencing another spreadsheet, I'd like to pull data in from a database.

View 1 Replies View Related

Queries :: Reference (parent) Description In Hierarchical Data Table

Apr 30, 2015

I have a table I'm trying to query information out of. Key fields are below:

RecNo (Key)
ParentRecNo
Description

I need to have a "record" in the query show both the description of itself, as well as it's parent. I was hoping to use Dlookup directly in the query design. If there is no other way, I suppose I could create a temp table and look through the recordset in VBA and dump them into the temp table, but like I said; quick and dirty was the hope here, it's for my own use, and the tables aren't large 50-100 records is what I'll be pulling out when I use this.

View 1 Replies View Related

Autofill Columns Of Table With Values From Another Table

Jul 10, 2006

Hello

I have two tables tblCList and tblCode. The primary key of tblClist is an autogenerated number which is the foreign key to the tblCode.

The tblCList has another column names sClist.

whenever I import values from Excel into the tblCode, I need Access to look up the text values from the sClist in the tblClist and insert the appropriate number corresponding to the entry in tblCode.

Please Help


Thanks

View 2 Replies View Related

General :: Creating A Form For Data Entry Into Main Table

Oct 21, 2014

I am creating a form for data entry into my main table. It shows all the fields including a name, date, id number etc.

I am trying to put a subform on the form containing a query. The query has two filter parameters fed from two unbound boxes on the main form (date and name). Their purpose is to filter records on the query to just show those for one person on one day. It also calculates a duration based on a start and end time. The query results are ok.

I can't get the query to display properly in the subform.

Subform Properties/data/source object is set to the query name. I'm told i have to link the master fields and child fields but when I try I get the error 'can't build a link between unbound forms'. I thought all that was necessary to bind forms was for there to be a common field between the form and query? Both contain fields from the main table including date, name, start time and end time etc.

View 4 Replies View Related

Queries :: Group Financial Data To One Main Table - Round To 2 Decimal Places

Feb 25, 2014

I have about ten append queries to group various financial data to one main table.

I have used the round function (iff (Round(Nz([FIN_data]),2)) in the queries to round the original data into 2 decimal places but there is still one or two lines exceeding 2 decimal places.

What is the better approach to have only 2 decimal places for all append data?

View 4 Replies View Related

Tables :: Pull Field From Main Table And Create A New Table With Date Stamp

Nov 4, 2014

I have a make-table query that pulls all the fields from 1 table (MainTable), and creates a new table with a date stamp based apon a form value entered (New Table = MainTableWithDate).

Currently, I setup the query to pull info from the form field like this:

DateField: [Forms]![frmmain]![DateField]

However, when the make-table query is done - all date fields are blank (all other fields are correctly created), and when I look at the new created table (mainTableWIthDate), the typeassigned to the date field is "Binary" (in the form, I've specified LongDate).

View 6 Replies View Related

Queries :: Updating Child Table List View On Change Of Main Table Row

Apr 19, 2013

Here's a query that the bottom listview in the attached form i.e. a listview representing a table of calls(many) to fims (1 top listview)

Code:
SELECT calls.id, calls.firm_id, calls.called, calls.said, calls.spoke_to, calls.next
FROM calls
WHERE (((calls.firm_id)=[firms].[id]))
ORDER BY calls.called DESC , calls.next DESC;

When I run the thing...I get a dialog asking me for firm id.

I want to change this so when I move up and down the firms LV (top)... the bottom LV updates taking firm id from the top LV with focus.

Access 2003.

View 2 Replies View Related

Modules & VBA :: Copy Record To History Table And Then Delete It From Main Table

Jul 9, 2014

I have a form with a sub form. when a record is choosen in a combo box the sub form is filled out with a record.

what I am trying to do is have a button that will copy that record to a history table then delete it off the the main table.

I cheated by using the wizard to get the code to delete the record but I am having troubles modifying the code to copy that record to the history table. Here is the code below. I have tried to insert code in several places but it just errors out.

'------------------------------------------------------------
' Master_tbl_sub_fm
'
'------------------------------------------------------------
Function Master_tbl_sub_fm()
On Error GoTo Master_tbl_sub_fm_Err
With CodeContextObject
On Error Resume Next

[Code] ....

View 8 Replies View Related

Records Existing In Main Table Not Found In Temp Table

Apr 11, 2007

Hoping someone can help me with this DELETE query. I have a Main table that's being updated by a Temp table that's an exact copy of the Main table but with a subset of records.

1) Insert records from Temp table NOT found in the Main table - this query I have worked out below - not tested, but the results look correct.

Need Help Here...
2) Delete Records from the Main that are not found in Temp table with an exception...only DELETE records where certain key fields are matching. i.e. If S.CAD_NAME, lngStoreNumber are a match to what's in the Main table. While
Temp table:
lngStoreNumber - CAD_NAME - lngcomponentSerial
1 - "CHK" - a
1 - "STK" - a
2 - "CHK" - a

Main table
lngStoreNumber - CAD_NAME - lngcomponentSerial
1 - "CHK" - a - LEAVE (EXISTS In Both Tables)
1 - "CHK" - b - DELETE (lngStoreNumber & CAD_NAME composite Found /lngcomponentSerial NOT Found in Temp)
1 - "STK" - a - LEAVE (EXISTS In Both Tables)
1 - "RMM" - a - LEAVE (lngStoreNumber & CAD_NAME NOT Found in Temp)
2 - "STK" - a - LEAVE (lngStoreNumber & CAD_NAME NOT Found in Temp)
2 - "CHK" - b - DELETE (lngStoreNumber & CAD_NAME composite Found/lngcomponentSerial NOT Found in Temp)
3 - "CHK" - a - LEAVE (lngStoreNumber = 3 Not in Temp table Subset)

Rule: Only delete the records for a particular CAD_NAME and lngStoreNumber from the Main table leaving all other CAD_NAME/lngStoreNumbers.

I'm running these updates in batches of lngStoreNumber. So the Temp table will only contain subsets of what's to be deleted from the Main table thus the need to link on the key fields only NOT to delete a Subset of lngStoreNumber/CAD_NAME. I think I've tried every possible query that doesn't work.

Here is query #1 to insert records missing from the Main table that exist in the Temp table. I think what I need is a variation of this???
SELECT D.*
FROM Main AS S RIGHT JOIN Temp AS D ON (S.CAD_NAME=D.CAD_NAME) AND (S.lngcomponentSerial=D.lngcomponentSerial) AND (S.lngStoreNumber=D.lngStoreNumber)
WHERE S.lngcomponentSerial is null AND S.CAD_NAME is null AND S.lngStoreNumber is null;

THANKS.

View 2 Replies View Related

Queries :: Delete Main Table Row Depending On Sub-table Row If It Is Null

Dec 25, 2014

i have two data tables, one is depending on the other. now i need to delete the main table row depending on the subtable row if it is null.

View 3 Replies View Related

Forms :: Enter Details In Main Table And Related Sub Table

May 5, 2013

I have a table TO-det and another table DO-DET.The table DO-det will have details about all DO for each TOID record.Both have a common field name TOID The tables are related under ONE-MANY relationship.One TO-DET record can have many DO-DET record

Now I wanted to create a form where if i add a new record to TOID i must also be able to add data for DO-DET for that corresponding TOID.

View 1 Replies View Related

How To Manage A Notes Table With A Weekly Imported Main Table

Mar 6, 2013

I have a main table that is imported weekly from another Access DB which I have no control of. I also have a new table with a notes field and a product ID field. The issue is the product ID field in the main table is constantly growing. When I created a query with all of the fields from the main table and the notes field from the notes table I could not enter any data into the notes field unless the product ID was already listed in the notes table. Is there a way to make a query update the notes table or a macro to add the missing product IDs from the main table to the notes table?

View 3 Replies View Related

Autofill A Value In A Table

Sep 7, 2004

Hi!
My first post here!
I am quite an amateur at database programming.

I am developing a form to input data about paint samples into a database which represents a sample library.

When the user starts to input data about a new sample into the form, they first have to choose a 'base metal' from a combo box on the form. Based on this 'base metal' selected, after all other fields have been filled in, i want to generate a 'catalogue code' for that record (The 'catalogue code' is an alpha-numeric code). Both 'base metal' and 'catalogue code' values are entered in two fields in the table.

for this i want to have a command button 'Get Catalogue Code' which runs a code to compile the 'alpha-numeric' text using two different tables. I want this text to be inserted into the 'catalogue code' field in that particular record and a message box informing the user what that text is.

I can figure out the code to compile the text and the message box. What i dont know is how to insert the text into that field in the table.

I am willing to provide any more information, including my database to anybody who can help! Thanks in advance!

View 5 Replies View Related

Need: To AutoFill Value From Table/Query

Jan 28, 2005

I'm hoping someone here can help me out with existing code or at least point me in the right direction... In one of the databases I am developing, I need to set up the ability for one field in NEW records to be autofilled with the next value from a table or query.

Details
My database includes the following objects:
tblSupervisors - supervisor information (including an indicator if they are 'active')
tblCases - case information including name of supervisor assigned to review this case
frmNewCases - allows data entry of new information to tblCases
If someone enters a new case, the Supervisor field would (in an ideal world) automatically fill in with the name of the next active supervisor from tblSupervisors.

Example
The active supervisors in tblSupervisors are Joan, Mark, Lisa, and Gary.

Case #1 is entered and the Supervisor field is automatically pre-filled as Joan.

When Case #2 is entered later, the Supervisor field shows Mark.

When Case #3 is entered later, the Supervisor field shows Lisa. However, because the person entering the case knows Lisa is on vacation, s/he can click a button and Lisa's name is replaced with Gary.

Finally (for this example), Case #4 is entered and Joan is assigned as Supervisor again.


Whew!

Okay. That's it. (I hope.) Any and all help would be GREATLY appreciated!

View 2 Replies View Related

Autofill 2 Table Problem

Dec 5, 2005

I have a Form with a combo box that takes in formation from a table and auto fills it. But i cant get that autofilled info to enter into the main table.the one that the form is based off of. I tried to use an append query to move the info from one table to the other. It didnt work. does anyone know why this error pops up i cant see anything wrong...

Concrete Pumper Database Set 0 fieldsto Nulldue to a type conversionfailure, andit didnt add 3 records due to key violations, 0 records due to lock violations and 0 due to validation rule violations...


in detail what im trying to do is this. database is for remote control concrete pumpers.

I have a form based on a table. In this table i have fields such as model #, button 1 configuration-button 12 configuration date entered, date shipped etc.I created a form from the table and Instead of entering each of the 12 button configurations I would like to have that entered automatically when a model # is selected from a combo box. So i made a table with just model # and button configurations and set up a combo box on the form to match. now i need to get the button config from the button config table to be entered into the MAIN TABLE when entered into the form by combo box. oh man...i dont know if im too far gone or what...this may not make sence so please give it your best...I appreciate any input at all. I thought i could do it with an append query and a macro but now i dont think so.


thank you

View 1 Replies View Related

Autofill Table From Hi/Lo Form Values

Feb 13, 2007

Help. I know just enough about Access to get myself into trouble.

What I want to do is have a form where I enter a low work order # and a high work order # with a series of yes/no questions and then have that autofill a table with work order #s incrementally from the low value to the high value and attach all of the yes/no answers to each work order #.

How do I get the table to autofill from low to high work order #?

Thanks for any help in advance and type slowly. I'm not very bright.

View 2 Replies View Related

Autofill A Form Window From A Table?

Sep 25, 2006

Hi all,Sorry if this has been asked before, but I've used the Search function and can't find exactly what I'm trying to achieve.The Current SetupI have a database that I'm now trying to expand upon by adding extra features. One of these features I'd like to add is the ability to, firstly, know how many records in the entire datasheet have not been officially closed (i.e. have their 'rmaclosed' column empty), and, secondly, to have a list autogenerated that shows all of these records and allows the user to double click an item from the list and have that record open.Now, to make life easier, I should point out that I already have a successfully working search function in my database. Clicking a button from the switchboard opens up a form that allows the user to enter full or partial text into a box, then, at the click of another button, the main window of the form will automatically fill out with a list of all those records which match the entered text. The user can then double click anything from this generated list and the appropriate record will be opened.Working on the assumption that the code for what I want to achieve would be near-identical to this search function code, I have replicated both the form and code, and am now trying to adapt it; it is this adaption I'm having trouble with.The Current SituationTake a look at the attached image. That is how my form looks to the user when opened.Now what I really, really want to achieve is for that central window to be automatically filled out with the listed column headings of any record stored in the table maindata that has a Null value in the column rmaclosed when the form is opened. However, I don't see any option for 'OnLoad', so I'm willing to compromise and just have the user click a button.You'll see the button there for 'List RMAs'. When clicked, that should populate the main window with the records that have not had their 'rmaclosed' column filled out. The code behind the button - which is where I'm having the problem - is as follows:Private Sub cmdSearch_Click()Dim strSQL As String, strOrder As String, strWhere As StringDim dbNm As DatabaseDim qryDef As QueryDefSet dbNm = CurrentDb()strSQL = "SELECT maindata.ID, maindata.rmanumber, maindata.company, maindata.rmalogged, maindata.initials " & _"FROM maindata"strWhere = "WHERE"strOrder = "ORDER BY maindata.ID;"'THIS IS THE BIT I'M HAVING TROUBLE WITHIf IsNull(maindata.rmaclosed) ThenstrWhere = strWhere & " (maindata.rmaclosed) Like '*" & maindata.rmaclosed & "*' AND"End IfstrWhere = Mid(strWhere, 1, Len(strWhere) - 5)Me.lstCustInfo.RowSource = strSQL & " " & strWhere & "" & strOrderEnd SubThis code has been adapted from that which - successfully - runs my filtered search engine. The problem is that my search engine runs a query based on text entered onto the search form by the user, whilst the form I'm trying to write should simply list every record in the main table, filtered according to the state of the 'rmaclosed' column.As I said in the opening paragraph, although it's not essential it would be really nice to have a counter somewhere on the form that would show the total numebr of records in the filtered list.

View 10 Replies View Related

General :: Autofill Field In Table

Mar 17, 2014

I have 2 tables: A and B with field names:
ID, Title, Link

and one table C with:
ID, Title

The Link in each table "points" on another table.A points on B that points on C.(When you fill in column Link in table A or B, a Lookup table is used so that I can select one of the titles in the linked table).I want to add a new field name called Position in table A and B. The Position is supposed to describe the cells place in the tree.

Example: if A with ID 1 points on B with ID 2, and B with ID 2 points on C with ID 3 then in A Position data field it would say: "3.2.1".I would like it to autofill Position when I add a new title.

View 1 Replies View Related

General :: Autofill Sequence In A Table?

Oct 13, 2014

I'm creating a table with times of the day from 08:00 to 17:00 in 15 minute increments.

I'm going to use the table as a lookup to make it easier to enter an appointment time.

I don't really want to type them all by hand - does access have an equivalent to excel's drag and autofill a sequence? is it just as easy todo it in excel then cut and paste it?

View 6 Replies View Related

Using Table Selection To Autofill Some Fields

Jun 10, 2013

I created a table to allow me to enter automobile information.. year, make model, etc.

Now how can i make certain "drop downs" dependent on next to autofill info?

Such as

make= ford
model= crown victoria

make= chevy
model=impala

such that they could not choose a
make=ford
model=impala

because "impala" would not be on that dropdown selection/choice?

View 3 Replies View Related

Tables :: Autofill Information In Invoice Table

Feb 11, 2015

I essentially created an account since I can't seem to find a straightforward answer much anywhere else (plenty of hints on auto-filling forms- but that isn't particularly conducive to my specific need on this).

I've attached a blank copy of my database.

The immediate concern I'm having is that I want to be able to autofill data in the invoice table based on the customer table and the products/service table.

*I want to be able to select a first name [or other primary key if necessary] to fill in the last name, company, address, city/state/zip, phone, fax, cell/alt phone, and email automatically... that is without multiple dropdown selections or input to those sections at all.

*I want prices to fill in to the 'cost of product/service X' so that I may use it for other calculations in the invoice table- as well as to make forms from it directly.

View 7 Replies View Related

Reference Another Table

Oct 18, 2004

I'm trying to achieve something that I'm sure someone has figured out long ago. I have a DB that currently only shows the zip code for certain records. Is there a way that I can have the DB take the current zipcode, reference a zip code table, and then return both the zip and city/state?

Thanks

View 1 Replies View Related

Autofill Fields Based On Results From Another Field In The Table?

Apr 18, 2007

I have an Access database with several tables and a multitude of subforms which are displayed on a single master form. The subforms are used to facilitate data entry. In several of the tables there are fields which are related and I would like to have some of these fields updated based on the results entered in the related field (i.e. the answer for one field depends on the other).
Field 1Field 2
[facing][DISC_CODE]
un3
up1
dn2

Field 1 is a simply a description of the basic dataset. This field is already set-up on form as a combo box that allows the user to choose one of three options. Field 2 is a code number used by another piece of software to identify a particular symbol. It is a new field being added to the database. There are 200 codes that identify a wide range of symbols for different types of data and I don’t want to have to look them up when I, or my assistants, are doing data entry.

My question is this; is there anyway to have the DISC_CODE value, Field 2, automatically entered in the table when the value for Field 1 is selected in the combo box on the form?

View 1 Replies View Related

Autofill Field Based On Value From Table Using DLookup Not Working

Jan 8, 2013

I am new to Access (using Access 2012) and All I am trying to achieve is to autofill the field [Frequency] from Table FullList based on the value of [Frequency] from Table Courses using a DLookup code used to update the FullList form. The code is not updating anything! It is frustrating! Frequency is a number (integer) and while Course is a text. The figures of my Access database are below.

View 2 Replies View Related

Forms :: CBO From Main Form To Reference Control On Subform

Mar 12, 2013

Ok, this is what I have:

I have setup my main form with 2 subforms to mimic a split form; this works fine.

To search for a record, I am using a cbo on the main form which I would like the user to select from. Once selected, then this will populate the first subform.

This is the code I have for the cbo:

Dim intAnswer As Integer
If IsNull(Me!cboCaseNoCFDWit) Then Exit Sub
With Me!sfFocus.Form.RecordsetClone
.FindFirst "Me!sfFocus.Form!CaseNumber = """ & Me!cboCaseNoCFDWit & """"
If Not .NoMatch Then
If Me.Dirty Then Me.Dirty = False

[Code] ....

I get an error at the .findfirst; states that the Microsoft Engine does not recogize Me!sfFocus.Form!CaseNumber

And the reason I am not using a regular split form is because I cannot, get the form to the size that I want. The splitform works great with the code above (a few changes to it of course), but the bottom of the splitform (datasheet) is too long and I cannot shorten it.

View 2 Replies View Related







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