Updating Field Info Between Two Tables
Aug 19, 2015
My father tables contains all the relevant fields with info of my products (which are listed in records/rows). My sister table contains less fields but are all present in the father table. The info is imported from excel daily into the sister table - all the fields here change regularly except for the unique ID which is present in both tables. Because the sister tables' information for the records/rows changes, it is difficult to update the selected fields of the father table.
I want to update selected fields within my father table based on the information I upload from the excel sheet (which becomes the sister table when uploaded)
View Replies
ADVERTISEMENT
Sep 13, 2007
I am new to Access, so bear with me.
I am using Access 2007.
I have 4 tables created, and they are breaking out information for recording files that are being created from a PBX.
The tables are created as thus:
tbl_1
Key:ext_id | extension
tbl_2
Key:loc_id | location
tbl_3
Key:f-type_id | filetype
tbl_4
Key: mass_id | filename | date | loc_id | ext_id | f-type_id
Now I have created the relationships between the tables for the various ID's. My issue is the following:
I will be automating this process, so when the data is imported to the various tables, I need the relevant keys from tbl_1 tbl_2 and tbl_3 to be added to tbl_4 when the new data is brought into the tables.
As to the process of importing the data, I was looking at using PHP to facilitate this. Any ideas, help or direction would be greatly appreciated. I have looked around the net for an idea of how to solve this, but, being so new, I am not exactly sure how to word the question.
Thanks!
View 2 Replies
View Related
Jan 25, 2007
I have two Tables, Contacts and FlowMeters.
On the Flow Meter Form Info is listed specifically for each Flow Meter.
I would like to bring some of the information from the Contacts table on this form.
For Instance if I am on Meter 1T-02 I would like for it to associate that meter number with the name of the customer thats already on the form, then look up that customer's name in the contact table and bring over that customer's contact information.
I built this database over a year ago and it has been a long time since I have worked with the design of it, therefore I am a bit rusty.
Please help if you can.
Thank You
View 1 Replies
View Related
Feb 6, 2015
I have 2 tables, "Counselors" and "Appeals". There are several names in the Counselor table but it is not a fixed number of names (rows) usually around 7. There is also some variable number of records in the Appeals table, could be 0, could be 50, depending on the day.
I need to, in a round robin fashion, assign the counselor names one by one to the records in the Appeals table. How to loop through the 2 tables and update the name field in the Appeals table with the name in the Counselor table.
View 1 Replies
View Related
Feb 16, 2006
I have the following code working great with creating new contacts in Outlook from Access. My problem is I can't figure out a way to update already existing contacts in Outlook.
Function AddContacts()
Dim OutlookObj As Outlook.Application
Dim Nms As Outlook.NameSpace
Dim MyContacts As Object
Dim MyItems As Object
Dim MyItem As Object
Dim Db As Database
Dim Rst As Recordset
Set Db = CurrentDb
Set Rst = Db.OpenRecordset("CustomerOutlook", dbOpenDynaset)
Set OutlookObj = CreateObject("Outlook.application")
Set Nms = OutlookObj.GetNamespace("MAPI")
'to point to a nested folder in Outlook you have to create folder items in folder items:
Set MyContacts = Nms.Folders.Item("Public Folders").Folders.Item("All Public Folders").Folders.Item("Our Contacts")
Set MyItems = MyContacts.Items
While Not Rst.EOF
'Declare which form to be used to add your contacts
Set MyItem = MyItems.Add("IPM.Contact")
'add fields, to find out which fields are available take a look at all the available members of the
'ContactItem class in the Outlook object library.
'Be careful, Microsoft is using various names for outlook fields!
MyItem.CompanyName = Rst!BusinessName
MyItem.FirstName = Rst!CFirst
MyItem.LastName = Rst!CLast
If Not IsNothing(Me.WebSite) Then
MyItem.WebPage = Rst!WebSite
End If
If Not IsNothing(Me.CMiddle) Then
MyItem.MiddleName = Rst!CMiddle
End If
If Not IsNothing(Me.Suffix) Then
MyItem.Suffix = Rst!Suffix
End If
MyItem.JobTitle = Rst!JobTitle
MyItem.BusinessTelephoneNumber = Rst!Phone
MyItem.Business2TelephoneNumber = Rst!BackPhone
MyItem.MobileTelephoneNumber = Rst!Mobile
MyItem.BusinessFaxNumber = Rst!Fax
MyItem.Email1Address = Rst!Email
If Not IsNothing(Me.Address1) Then
If Not IsNothing(Me.Address2) Then
MyItem.BusinessAddressStreet = Rst!Address1 & ", " & Rst!Address2
Else
MyItem.BusinessAddressStreet = Rst!Address1
End If
End If
MyItem.BusinessAddressCity = Rst!CCity
MyItem.BusinessAddressState = Rst!CState
MyItem.BusinessAddressPostalCode = Rst!PostalCode
MyItem.Categories = Rst!CustomerType
MyItem.FileAs = Rst!BusinessName
'MyItem.Etc = Rst!Etc
MyItem.Close (olSave)
Rst.MoveNext
Wend
End Function
View 2 Replies
View Related
Oct 9, 2014
I want a field that I will enter the current work experience of an employee years and months and i would like it to update as time passes. I am willing to accept it displayed as a decimal, i.e 4 years 7 months would be 4.7, I would just need to have it calculate on base 12 but I don't know how?
View 1 Replies
View Related
Nov 6, 2013
So I currently have a table that tracks medication activity for patients called tblMedRanges. The Fields are the ID, StartMedication, EndMedication, Med ID/Medication Name.
In the End of Medication, some patients are not currently active so they have a set date/time field property. What I have for right now is the default value is set to
Code:
=date()
So that when staff adds a new medication it is set to the current date. These patients are supposed to be active, but it doesn't update the default value. I want it to continue to update to the current date every time the database is open.
I have three options that I know of(or think I know of) to update but can't commit to one in particular :
1)I want these individual records in the field to update the current time for today and was considering using some kind of data macro code using before update.
2)The other idea I had was splitting up the field into an EndOfMedication field that would display a value only if their inactive, and an Active field (text, value list active/inactive choices) that would be used in a query to generate the current date as med field. This would take some crafty query work with comparisons later on to generate list of drugs that they were on for each visit.
3) set to text field and convert the field to date field for comparison in queries.
View 2 Replies
View Related
Dec 1, 2013
I have a table in my DB called, devices. This contains all the information about various devices we have deployed in the field.
These devices are also contained in 2 other separate MySQL DB's.
What I need to do is add 2 additional field to my access table for the DeviceRecno and DeviceID of the same device from the MySQL DB's.
Adding the field is easy, but I cant think of a way to enter the recno and ID from the other DB's without typing them in manually for each one.
The common between them all is the serial number of the device, and I can get a list of serial numbers, recno's and ID in an excel sheet.
like a vlookup in excel to easily populate all the existing records with the recno and id's from the other db's?
When I created the access system there was no intention to link it to the other DB's for any reason, but that has now changed due to a lot of reasons.
View 4 Replies
View Related
Apr 24, 2014
In the code below I am creating a record with the INSET INTO statement and then Updating with additional info in various fields. it is not working the way I thought it would, so I am trying to create the record in it's entirety.
Code:
SQL_Grade_GUSD_ID = "INSERT INTO Grades (GUSD_Student_ID) VALUES (" & Me.GUSD_Student_ID & ")"
SQLM1_1_ELA = "UPDATE Grades SET Grades.Subject = ""BM1(ELA)"""
SQLM1_2_ELA = "UPDATE Grades SET Grades.Type = ""Exam"""
SQLM1_3_ELA = "UPDATE Grades SET Grades.Score = ""0"""
SQLM1_4_ELA = "UPDATE Grades SET Grades.Nam = ""GUSD BM-1"""
DoCmd.RunSQL SQL
[Code] ...
I am running to syntax problems when I try to USE the INSERT INTO to create the record with all the info in one statement.
Code:
SQLM1_1_ELA = "INSERT INTO Grades ( GUSD_Student_ID, Subject, Type, Score, Nam ) " & _
"SELECT (" & Me.GUSD_Student_ID & ")"" AS GUSD_Student_ID, ""BM2(ELA)"" AS Subject, " & _
"""Exam"" AS Type, ""0"" AS Score, ""GUSD BM-1"" AS Nam " & _
"FROM Grades"
I am Getting this error:
Syntax error (missing operator) in query expression '(12345)" AS GUSD_STUDENT_ID,
"BM2(ELA)" As Subject, "Exam" AS Type, "0" As Score, "GUSD BM-1" AS Nam From Grades'
View 3 Replies
View Related
May 16, 2005
It seems that there are a few different ways to get info from the tables when developing an applications that i know of:
1)queries
2)dao
3)ado
4)selects without any of the above
I lean towards the last 2 but I need to know this: is there any advantages in using ado as opposed just sql?
For instance i ran this sql:
Private Sub Command0_Click()
Dim SQL As String
Dim strCriteria As String
strCriteria = Forms![form2]![Text1]
SQL = "SELECT * FROM Table1 WHERE (((Table1.clinic)='" & strCriteria & "'))"
DoCmd.OpenForm "frmClinic"
Forms![frmClinic].RecordSource = SQL
End Sub
it worked fine. I could see how a beginner would prefer to use queries over sql but I would prefer to use sql in vba. I've read that dao is older and I should use ado instead. So that leaves ado vs. the way I displayed it in the above code. So which way should I go? If I'm over looking queries or dao in favour of ado/sql, just point out their advantages if you don't mind.
Thanks,
scratch
View 4 Replies
View Related
Jun 7, 2006
************** edit: Fixed!!!! *************
The database I'm working on is coming on nicely, thanks to some valuable help from this forum. But I've got a couple of new problems that I just can't seem to get my head around. Really hope someone out there can help!
So...
I have two tables (well, there are more.. but there are two main ones with the important data on them). The first is a list of Customers (you know, the usual Name, contact, telephone etc...). The second is a list of jobs for each customer.
After starting from scratch, I created a nice looking form wth control tabs that on one page shows you the customer information and on the second; the job history for that customer. I then have a third tab which lets you add new jobs. So I'm all chuffed because that is the basics of what I wanted it to do.
However, I need a hard copy of the job report to print out and give to an engineer to fill in or to print in future should a customer wish to see it.
Try as I might, the reports function didn't look as if it was something that could be "designed" the way I wanted it to look. So, I figured another form was in order.
I started by building a query which included all the fields from the two tables mentioned above in it; I.e. So it would pull up a Job Printout by a workorderID number. That way it would show all the company info PLUS the detail of that one particular job.
Problem is this: I can see from the query in table view that the Jobs are listed; but alongside them is a straight listing for all the companies in the database. Basically, the Company who received the job in question is not being shown by the query.... if you follow me. (Apologies if I'm explaining this like a fool).
Question 1 then... is how do I fix this? Is this something to do with these arcane relationships things?
Question 2: How do I create a button to print that one "form" by workorder ID.
Question 3: Did I do the right thing by using a "form" or is there a better way to create a "report" for printing that can be formatted the way I want (with logos and stuff)
Thanks again peeps!
View 3 Replies
View Related
Nov 8, 2004
I am trying to get an email address from a table by choosing a employee number from a combo box...it is almost working,
however, it is returning the employee number as opposed to the email address...here is the code I am trying to use:
Private Sub Combo0_AfterUpdate()
Dim myConnection As ADODB.Connection
Set myConnection = CurrentProject.Connection
Dim myRecordSet As New ADODB.Recordset
myRecordSet.ActiveConnection = myConnection
Dim mySQL As String
mySQL = "SELECT EmailName .*,[Employees] FROM EmployeeNumber"
myRecordSet.Open mySQL, , adOpenStatic, adLockOptimistic
myRecordSet.MoveFirst
myRecordSet.MoveNext
myRecordSet.Close
Set myRecordSet = Nothing
Set myConnection = Nothing
End Sub
Then, in the section for the command button and the Outlook code, I have:
eMailAddress = Me![Combo0].Value
like I said, it is returning the same value that is in the combo box...if anyone could help, it would be greatly appreciated
View 1 Replies
View Related
Sep 29, 2007
I'm a genealogy nut and not so great at computers. I've got a report on cemeteries that gets things like a cemetery number, peoples names and tombstone information from one table. Got that working pretty well. I've got it to print the cemetery number in the detail header (there are 300+ cemeteries each with 1-100s of people in each). I want to take that number and use it in a different table to get travel directions and GPS for each cemetery.
View 3 Replies
View Related
Apr 2, 2012
I am very new to access and I am trying to create two tables called Customers and Orders.
The fields in Customers are:
CustomerID (Primary Key), First Name, Last Name, Address.
The fields in Orders are:
Order# (Primary Key), CustomerID, Product Purchased, Address.
There is a One to many relationship between CustomerID in the table Customers, to the CustomerID in Orders.
The problem I am having now is with the Address field.
GOAL: What I am trying to do is have the Orders table automatically get the Address from the Customers Table.
If that doesnt make sense, whenever I create a new Order, I want to enter the customerID, and have it get the Address data from the Customers table automatically put into the proper field in the Orders table.
View 5 Replies
View Related
Feb 21, 2005
How does one cause certain data to appear in another field based upon the data entered in another field.
For example: I enter in the field the word "Carrot" in a field called food and the word "Orange" appears in the field color. And then if I enter the word "Beans" in the field food then the word "Green" appears in the field color.
Thanks for you help in advance.
Eric
View 1 Replies
View Related
Sep 25, 2005
Hi there,
I just can't figure out how to solve my next problem. What I need to do is to make a query showing all the country's next to germany(nr.5) with their capitals. There are three tables which I can use, nr.1 showing the country_id's with their "neighbour country's", nr.2 showing the name of the country's with their capital_id's and nr.3 showing the name of the capital with their corresponding country-id.
Is there anybody who could help me with this problem, or has some suggestions? If you find this message unclear, i would love to e-mail you the tables.
As i am dutch my english isn't that good.
Thanks in advance
1:
country_1 country_2
12
13
14
15
24
25
26
210
35
45
57
512
612
89
1011
1314
2:
idname capital_id
1Belgium 1
2France 4
3Netherlands 9
4Luxembourg 14
5Germany 6
6Italy 12
7Denmark 15
8United Kingdom 11
9Ireland 16
10Spain 17
11Portugal 18
12Austria 19
13Sweden 20
14Finland 21
15Greece 22
3:
idname peoplecountry_id
1Brussel 1370001
2Antwerpen 4970001
3Gent 2357001
4Parijs 21762432
5Lyon 4184762
6Berlijn 34000005
7Bonn 2930005
8Munchen 12670005
9Amsterdam 10380003
10Rotterdam 5760003
11Londen 66780008
12Rome 28260006
13Milaan 15150006
14Luxemburg 790004
15Kopenhagen 4820007
16Dublin 5260009
17Madrid 320000010
18Lissabon 80700011
19Wenen 151200012
20Stockholm 65100013
21Helsinki 48400014
22Athene 100000015
View 3 Replies
View Related
Oct 30, 2014
I created the database in the attachment. I have three tables which are connected. I am trying to create a form to show the connection of the tables. As you can see, I have inserted the 'Item Code' in the form 'Products'. I am trying to add 'Cndl Codes' and the 'Cndl Quantities' of each 'Item Code' showing above 'Item Code' in the form, but I don't know how to do it.
View 1 Replies
View Related
Nov 15, 2013
I am trying to update an existing table in Access with current information that I have imported into Access from excel into a separate table. I was able to use an unmatching query and append all records that were not already in the original table. But there are records in the update table that match the original table, and there in information in fields within that records have new information.I need to find the records that match in the two tables and update the missing data.I am able to create a query that displays the matching records but when I run it as an update query the information in not entered into the original table.
View 7 Replies
View Related
Oct 23, 2013
I am working on a database which has two tables used as part of a registration and login process.
I would like a couple of fields from table one to automatically update in table two, once the fields in table one are populated without using an 'on click' event.
The reason I would prefer not to use an onclick is because the completion of the form used to generate the users table does not require any buttons for the data to save.
View 1 Replies
View Related
Apr 7, 2015
I have now been asked to create 'something' (form, query, whatever) that will:
Allow the engineers to change the date in multiple tables for parts; and,Change (in)activity status information in those tables; and,Delete the same obsolete part(s) from two tables and add that information (one entry) into another table.
View 1 Replies
View Related
Feb 14, 2007
Hi guys.
For my coursework I was told I need complex queries to gian high grades.
This is my problem:
I have many many tables all identicle. They have the same field names just different information on them.
I wanna be able ot query ALL those tables to bring 1 result which I will then make a report out of.
I have tried everything, I fidled with the relationship but can't understand it.
Oh, and the tables have been linked form excel. I know i can't edit it then, but i dont need to.
I would really really apretiate all responses as this needs to be done asap.
Thanks in advanced.
View 9 Replies
View Related
Apr 25, 2006
Hi everyone,
I've tried several different things to get around this problem and have found out a lot about what won't work!
Basically I am building a HR database. The main table is M_CandidateDetails and the primary key is CandidateID. This is a foreign key in all of the other tables: MCandidateEducation, MCandidateEquipExp, MCandidateSector. (I've attached a screenshot of the relationships.)
Goal:
What I want to do is create a continuous form with one record for each candidate. A record will show all of the info pertaining to a candidate. The form is to be used to for searching and filtering candidates.
Attempts..
First I tried creating a query to combine all of the information. (I've attached a screenshot of the query). The only problem with that was if joe bloggs had worked in 3 different industry sectors there would be 3 records for him. (I did have problems with the query not being updatable - solved that though by using the Dynaset property of the form)
Next I tried basing the form only on the M_Candidates table and using listboxes to display the information from the many-side of the various tables. But that didn't work as you cannot use an unbound control on a continuous form.
Then I tried putting in subforms instead of listboxes but you can't use subforms on a continuous form.
I'm out of ideas now- can anyone give any tips?
View 5 Replies
View Related
Mar 11, 2014
I have 3 tables.
One is a list of fishermen with all their info. I used a Code as the primary key.
The 2nd is a fish ticket sheet with fish tickets entered and the code in there as a foreign key in the relationship between the two.
I create a report listing the fish tickets and prices perfectly for the 4 fishermen I have entered fish tickets for. (I have 140 fishermen in the main table)
I added a 3rd table for payments made to the fishermen. There are two payments for 2 of the fishermen.
then, I go into report design view and drag in two of the cells from that 3rd table into my report.
The problem is the report then prints JUST the fish tickets and payments for the two fishermen that have payments...not the info for all 4 fishermen. I need to print out settlements for all the fishermen whether they have payments or not?
View 1 Replies
View Related
Aug 24, 2012
I am importing the updated Employee Roster information from Excel to a table called "Weekly Roster Check" (contains new info). I have a table called "Current Chit Board" that has an Employee Roster that I update every week (contains old info). I want a query to find employees who are promoted and their title has changed. then I want to run an update query to update these results to the Current Chit Board table.
Every method I try, returns either no information or information that is not what I want.
View 3 Replies
View Related
May 7, 2013
I have DB used for inventory for many different categories. I have a table and form for the following: Location, Printers, Pc's and many more.
What i am trying to accomplish is to have a advanced search form that will display how many pc's and there makes and model from selecting the location name or Cost center from a combo box.
So an example would be I want to select MPP-WDF from the combo box click a button and it will return the number of PC and there makes of model's and some other information in a list of records.
View 9 Replies
View Related
Apr 24, 2013
I have a form that I need to turn into a table. The table will be updated each day with new information but I dont know what to do to keep the previous days info. I have attached the form ....
View 3 Replies
View Related