Linking Tables On "save" Command
Jul 18, 2005
Hi
I am very new to Access and have recently built my first database (using
Acess 2003), the purpose of which is essentially to enter our client firm
records and the details of related contacts within each firm. Firms can have
more than one contact.
I've built the database created the input form (capturing both firm and
contact details) and all is working well but I have run into two small
problems where I believe a quick macro or programming solution is required.
I feel like after much hard work I'm very close but my knowledge of
programming is close to zero and I've run out of time!
The 2 issues are:
1. I have created a one to many relationship between my 2 main tables,
"Firm" and "Contact". The Firm table has a primary key field entitled
"MailingListID" that is simply generated by Autonumber. I have linked this
field to a number field of the same name in the Contact table but when I save
the record (just using a standard save command button), the "MailingListID"
is successfully generated in the Firm table but does not get entered into the
related Contact table as well. Leaving me with an unrelated/connected firm
and contact.
2. In most cases firms will have 2 or more contacts. I belive this is
accomoodated by the tables ("MailingListID" field against each contact
creates a link to a firm, this number can be held against multiple contact
records via the one to many relationship), I just need a form button that
saves the entered contact details, then clears all fields except the
"MailingListID" field ready for a second entry.
Can anyone help me please with the steps or code required to perform these
actions. I've scoured usergroups, manuals and help without any success.
Many thanks for any help you can provide.
Stuck21 :eek:
View Replies
ADVERTISEMENT
Sep 26, 2007
I've tried the basics, like changing the coding to 'OpenTable' and using the wizard, but I can't seem to get my form to open a table. So my 'dumb' question is- 'is it possible to open either an access table, or an excel spreadsheet with a command button on a form?' I've tried linking an excel spreadsheet to my database, I've tried importing it, but when you go to put the info in a form, its all in 1 field, so doesn't show all the information i need it to. :confused:
View 2 Replies
View Related
Jul 18, 2005
Trying to do something here on a form. Very simple, but I don't know why it is not working.
Have a form, First input is a Job Number, this field is a primary key. When you tab to the next field it is not coming up with an error on duplication. I'm not sure why. I put in a Docmd.save on "after update, then lost focus..... But apparently it is not saving when you tab off of this field. Simple answer????????
View 14 Replies
View Related
Dec 7, 2012
I have have a form with 4 subforms in it, one of the subforms is based on a filtered query . For a reason I can not work out I cannot get it to requery when I add a new record.
To add a new record I select from a combo box and use a command button to save the record
I have tried using this in the buttons on click event
Code:
Forms.trialcatalogueF!TrialCompetitorsSF!competitorsSF.Form.Requery
with no result, however it does kinda work in the combo's after update event, just not until I select another value.
View 2 Replies
View Related
Sep 30, 2014
I have a form named CORRES_TYP with 3 text boxes and a list box. I also have a separate table with 3 field from where the information I put in the form was saved.
In my form whenever I put information on the textbox at hit add record button, these information are saved in my table and will reflect on the listbox on my form below the textboxes. Also if I select a record in the Listbox the record I selected will apprear on the corresponding textbox in the same form.
My problem is that I have been trying to create a command button that will save and change the existing record everytime I select an item in the list box and modify the information through the textbox. Here are some infromation about my table and form:
Table name = CORRES_TYP
Field 1 = CODE (Primary key, No Duplicates)
Field 2 = DESCRIPTION
Field 3 = FOLDER
Form name = CORRES_TYP
Textbox 1 = CODE
Textbox 2 = DESCRIPTION
Textbox 3 = FOLDER
Listbox name = LIST14
View 9 Replies
View Related
Aug 1, 2013
i'm using a form with an unbound text box to temporarily hold data that i want to use in several other places (all those functions work great). last step is to save the newly created table with a different name (will be used for a mail merge later so must be a separate table or else we'd have to filter thousands of records during each mail merge) and i want to use the data i've temporarily held in my unbound text box within my form as the name in the save as function.
can i specify a variable as a file name within the save as function? is there a better way?
View 4 Replies
View Related
Jan 25, 2005
I am facing a problem. i am very amateur at access. I want to design a form on which there is one combo box and one command button. If i made a selection from the combo box and clik on command button it should show all the details related to that particular selection (say Shop Order) on a report. I dont know how to link this things.
report may be like..
Shop Order Description Length Width Hight..
Ax12 xxxxxx xxx xxx xxx
Ax 12
for a particular shop order selection there may be no. of parts that should show on.
like an assembly thing. Suppose Shop order for a bag is A23 and its different parts are belt and chain...
now
SHOP Order description ......
A23 belt
A23 Chain...
i hope i described my problem..
please do help if you can..
Thank you
Hemendra
View 2 Replies
View Related
Dec 7, 2006
Hello
I need to select information from different combo boxes. Using a command button, i would then like the information transferred onto a list box.
I have so far managed to link all my combo boxes so the result comes out on a list box. if one combo box is left blank, i get no information in the list box. is there a simple way of doing this.
Thanks
Dharmesh
View 9 Replies
View Related
Dec 3, 2012
I have 2 identical database in terms of structure but it differs in data.
Basically I would like to import data from subDatabase to mainDatabase and ensuring that there are no duplicate records.
I have used the "link to datasource method" through importing the tables to have the "updating" function.
However, this method also means that the records in mainDatabase are also imported over to subDatabase which I do not want.
Is there a method to ensure that the records are shared/update one way only? (i.e. import from subDatabase to mainDatabase and not main to sub?)
View 1 Replies
View Related
Sep 26, 2012
Currently trying to build a database for customer management and order placement/tracking. Want to set a couple of rules so that if I for instance click yes of billing and shipping address the same that the database will automatically fill the shipping address with the data I inputted for the billing address in the same table.
The other issue I can see I'll run into is, I want to be able to select one of the company ID's (made up of a three letter abbreviation of the full company name) in the product ordering table and it will automatically fill in the rest of the customer data (phone, email, address etc) data into that form.
View 2 Replies
View Related
Apr 15, 2014
I am doing a project where we are collecting home owner data and information on all the dogs in the household. The data for homeowner has an autonumber primary key because no field is unique or has been consistently collected. I am struggling to link the data for the dogs to the owners because an autonumber primary key will not work since not all homes have dogs. I need to have this set up so that people who are not tech savvy can look up each homeowner (or dog) and get the dog (or home owner) information. And to make things even more fun we need up to 15 potential dogs per household each of whom will have 18 different pieces of data collected.
It looks a little like this (and you can see my not matching ID issue):
Homeowner table
ID First Name Last Name...........Total Dogs
1 Max Maximus 5
2 Min Minimus 0
3 Mus Musculus 1
Dogs 1-5 table
ID Date Dog 1 Name Dog 2 Name .......Dog 5 Name
1 (Max's) 4/11/14 Bobby Billy Betty
2 (Mus's) 4/11/14 Jojo
Min will have no dog records at all, just home information.how to link the dog's to the homeowners .
View 3 Replies
View Related
Mar 18, 2013
I have been asked to design a database to replace our old excel sheet to log one of our customers server builds. It a four noded system and i require a seperate log for each node serial models of parts etc, qa checks.
I intitial started by just using one table but forgot the limit was 255 rows, i need about 600 - 700. So my plan is now to transfer to indivial table for each node. Then, a general table named Main for all my other details.
Although this seems simple, i now have the annoying task of being able to link them all together and produce a single PDF file to send to our customer whilst only entering our system serial number once to produce this.
My basic understanding will be to create a System Serial Number field in each table a link it via relationships, but if i produce a report with everything i need would it input my details for all four nodes? If so how would i set this up?
I will be splitting the database once completed and then making a ACCDE file for my techs to use.
View 4 Replies
View Related
Sep 28, 2012
I recently imported an excel file into access. Let's say it contained data for both domestic and international customers. With different things needed from each type of customer, once in Access, it became needed and easier to create separate tables- one for international and one for domestic. However, each customer needs their own unique id - and I need a way to link or relate the tables in a manner that it will not allow duplicate customer numbers between the two tables.
View 7 Replies
View Related
May 23, 2013
I have two tables called Hardware and Desk. They both have two fields called ChangeID and Priority.
What I would like to do is set it so that if we change the Priority in a record existing/created in 'Hardware', the Priority of the related record in 'Desk', also changes.
How can I achieve this?
View 2 Replies
View Related
Dec 26, 2012
Warehouse inventory system in access 2003. I have set up two primary tbls: Equipment and ETO (Equipment transfer order) both have an autofill primary key and the equipmentID is part of the ETO tble. There is a one-to many realationship from the equipment to the ETO. There are other tables (4) in the system but they are used as look-up tables and i'm not concerned about those.
Equipment Table layout: EquipmentID, ModelNumber, SerialNumber, Mfg, ProductName, CurrentLocation, Category. This table is used as the repository for all of the equipment that needs to be tracked and inventoried. It will not change much with except the CurrentLocation changing as the stuff is shipped around (in Store, In Warehouse) and of course when new equipment is being added.
ETO table layout: ETOID, ETONumber, FromStore, ToStore, OriginStore, ETODate, ModelNumber, SerialNumber, MfgID, ProductName, LocationID, CategoryID, EquipmentID. This table will be used (I hope) to basicly track the equipment as it moves from store to store to warehouse and back out again.
Process: Locate a peice of equipment by either SerialNumber or ModelNumber in the Equipment Table, change the location depending on it's status (coming in, going out) then i need to somehow update the ETO table with that ModelNumber, SerialNumber, Mfg, category, etc..But put in the FromStore, Tostore, OriginStore, ETODate, etc..
I have tried both the update query and append query from both tables but I can't get the results i need.
View 14 Replies
View Related
Nov 8, 2014
Under Current Database, I have "Overlapping Windows" checked. When I open a table, it opens to pretty wide. Then I resize it so that it takes up less space. After resizing, whether I click Save or not, after closing, then reopening the same table, it opens back to its original size (very wide), instead of opening at the smaller size that I resized the table to.
Is it possible to resize a table, and get it to open at that size next time you open that particular table?
View 2 Replies
View Related
May 19, 2005
Question for someone..... I was looking at the "LinkTables" in Access..... I see that I can link one database to another..... When I do this I can add the table to my relationship window... I have not played with this too much.. But looks interesting. Now, all the info I might add to this linked table is stored in the other database??? If this linked table is also linked to other tables in the other DB can I use those in queries? Not much covered (that I can find) in the Access help files on this sort of thing.
Thanks
View 3 Replies
View Related
Jun 26, 2006
I am looking to lonk tables in a database.
I have one table a pc tables which has a list of pc's
the other table is a pc software table which has a list of software
i want to build a form to show the pc's and their software how do i do this
View 5 Replies
View Related
Jun 29, 2007
I have a table with job info like: job #, job name, job addy.
I would like my end query to look like this: job #, job name, job notes.
I want the query to list all jobs, job names, and job notes for a particular week(we have a weekly meeting on the status of our jobs), so if I were to query the jobs for 6/26, i would get: job #, job name, and job notes for that date as fields in my query.
I am not sure how to accomplish this. Should I make a seperate table that contains job notes? If so, how would I accomplish this and create a relationship between the job info table and the job notes table?
Thanks in advance!
View 4 Replies
View Related
May 16, 2005
:confused: How can I link a table to one specific item in another table in order to avoid repeating information? (ex: school name that would be narrowed down to its different departments)
View 3 Replies
View Related
Oct 4, 2005
Excuse me for sounding extremely dumb, but I have a question that is really bugging me. I have created a database using two tables. The two tables are called User and Assets. In both tables I have set the primary key to be the field Username. I have also linked these two fields.
I have created a form that is my interface for the database and can add and delete from the table (User). I now want to insert a sub form into my form, that displays the contents of my second table (Assets) and reference's the field Username. Hopefully this will enable me to display my table (User) in the Form, whilst only displaying the relevent data in the subform (Assets) for the particular user.
I'm sorry if this sounds confusing, but I would really appreciate your help ...
:confused: :confused: :confused:
View 1 Replies
View Related
Apr 9, 2006
Dear all,
I have a question which I think is probably very straight foward for those who know about these things. I have just created a new database, but there are obviously some problems with the design, because when I enter information into a form, I don't seem to be able to access the information through queries or reports.
I have 11 tables, and one single form (I created the tables, and then used the wizard to create the form). The main table is called 'Client Information,' and the key in that table is the CaseNumber. They key in every other table is called something along the lines of 'ClientDetailID,' 'IncidentDetailID,' etc. When I look at the relationships between the tables, the 'ID' field in each table is linked to the 'CaseNumber' field in the Client Information table. However, I don't have any fields actually duplicated between the tables. Do I need to do this? (ie, should I have the 'CaseNumber' field appear in each table, and then the 'ID' field from every other table appear in the 'ClientInformation' table?)
thanks so much, this is probably a really simple problem but I don't think I really understand the whole relationships and linking tables thing.
View 3 Replies
View Related
Jun 20, 2006
Hi,
I have tables in MS Access and the same tables in SQL Server.
I want to link the appropriate tables up so that when i update the table in MS Access, it will automatically update the table in SQL Server. I want to do this using an ODBC link.
Anyone with any suggestions of how to go about this?
Thanks
View 1 Replies
View Related
Jun 21, 2006
Hi I need some help linking some tables...
Does anyone knoe how i would go about taking several years of contact information and compine it all into one table
Thanks
View 2 Replies
View Related
Nov 23, 2006
Greetings,
I was wondering if you could advice.
I have 5 or 6 questionnaires and each of these is linked together by a person Identifier number. How can I do it so that all the questionnaires recognise that these tables are all linked by the same number.
Secondly, if I wanted to say, do a search on a particular number, is there a way to do that if i say, searched for that number in a query, i'd get all 5 questionnaires come up rather than have to do a search for each table (ie. one search brings all the results from all the tables up or at least a link to them
What would be great is if you could do it so that you could do a search on say, all who were a nationality and it brings you up all the results for all the different questionnaires.
Please advise,
thank you
View 2 Replies
View Related
Feb 1, 2007
Hi,
I have a 'main' database named(A), and I have 2 tables that I have linked from two other databases(B and C). NOTE: I kept all this 3 databases(A,B,C) in one folder named 'Joe' on my workstation.
Here is the issue, every so often when I open my 'main' database, and I need to query the tables in B or C(which I have already linked to in my main database), I get an error message saying something like "path to c:...B is not found." To fix this issue, I have to use the "Linked Tables Manager" tool to relink all the tables again. As you can this, this is causing me a lot of unnecessary wasted time. What will i have to do to have these tables linked permantely so that I don't have to relink everything?
Thank you.
Joe
View 4 Replies
View Related