Possibly The Easiest Question Ever Asked
Feb 1, 2008
This is probably blindingly obvious but I'm unsure about it.
We'll refer to three tables, call them Table X, Table Y and Table Z.
Basically, I have a database with 10 tables. Table X links to Table Y via the Primary Key. Another field in Table X has a relationship with the Primary Key in Table Z (a foreign key).
Now, does the field in Table X that has a relationship with the primary key in Table Z need to be the primary key as well?
Put another way, does Table X need two primary keys?
View Replies
ADVERTISEMENT
Sep 10, 2006
I've developed a database for a small company but've now encountered a few problems. Initially, I was asked to create a table of customers and a table for business to business trade. However, I was then asked to merge the two tables together.
This led to a problem. The primary key was set to adhere with the already existing ID numbers of customers which were created by the company director years ago before the leap in to technology. For example, their first customer had an ID number of 1 outside of the database, and thus in the database the first customer would have an ID number of 1. This is simple, and could be achieved with an autonumber.
Outside of the database, ID numbers were created chronologically, so the first business to business trade did not have an ID number of 1, more something like 321. As I said a while back, the two tables had to be merged, and this left me with every customer in the first ~1000 and then all the B2B trade lumped on at the end. The question I'm thus asking is there anyway I can reorder the records selectively to retain their original ID number? It'd save the director a bunch of time.
Thanks in advance, David.
View 3 Replies
View Related
May 16, 2007
Hello folks-
I've tried to search for a solution to my problem, but I'm not sure how to phrase it to get a response. The problem:
I have a listbox that displays columns from a query. I would like to use the listbox to populate textboxes that relate to the same row (record). I’ve done it before, but the problem is that the query is run from a table that has no primary key. I’m not sure how to reference the correct record in the listbox without a key.
Is there a way to add a primary key to a query?
Cheers to anyone who can help. -Tom
View 4 Replies
View Related
Jan 25, 2006
Hello all,
in your oppinion which would you say was easiest to control through forms, more information per table, or
more tables with less information in each?
Thanks
View 10 Replies
View Related
Feb 5, 2008
I am trying to filter information in a table like you can filter information in columns in Excel. For example, if I have a table with data in it like dates and times and I wanted to filter to find all records with the date of 2/5/2008, how could I do that easily? Can it be a drop down box like in Excel. I'm making a program for someone, and I don't want for them to be able to change anything in the program so I have disabled viewing of some toolbars, besides, the filter button in the toolbar never does what I want it to do.
Thanks!
View 1 Replies
View Related
Dec 4, 2004
Hi!
I am new here and not very into Access. I know my way around databases (MySQL), but need som practical help using Access.
My girlfriend is a physiotherapist. I want to make a patient database for her. At the moment I have two tables:
Patient:
patient_id, name, etc.
Treatment:
treatment_id, patient_id, date, time, etc.
I have one form now: patient, where she can fill out all the information about the patient.
What I want is for her to find her patient, then press a button "new treatment", which leads to a new form with treatment_id (autonumber) and patient_id automatically filled out. All she then has to do is fill in the date and stuff.
How do I make this button? Do I have to make a query first or does this require macro's? Any hints would be very much appreciated!
View 1 Replies
View Related
Jun 7, 2007
I am using MS Access 2000 in a Windows Terminal Server 2003 Environment and the performance is incredibly slower than running the same job on a Stand Alone CPU with Access 2003.
Any idea? Access 2000 is running slower on a TServer?
May the Access version difference explain the difference?
Any idea would be appreciated.
Thanks!
View 4 Replies
View Related
May 1, 2006
Hello everyone. I'm a little new to the Access scene. I have a strong background in C, C++, Java, and assembly. Seems all the access books out there fail to mention the need to know vbs, heh.
Anyhow, I have a form ([WrkR]) based on a table ([ORDERS]) that has a customer's name ([Tables]![ORDERS]![name]), total payments to visa ([Tables]![ORDERS]![visa]), and total payments to cash ([Tables]![ORDERS]![cash]), and total payments to debit ([Tables]![ORDERS]![debit]). My form also has three rows, each containing a text box which holds how much a person has paid, and a combo box ([combo1], [combo2], [combo3]), that allows the user to choose what payment type was used. I have included a screen cap to demonstrate this.
I need to be able to create a function or macro, anything that will sum up the appropriate totals and store them in the corresponding columns in my table. Like in my example, there are 2 visa costs and a single cash cost that should be added up and stored in my table in the appropriate fields.
View 6 Replies
View Related
Feb 15, 2007
Small project for the local police dept. They want an easy small program to track overtime and who gets it, got it, doesn't want it, etc.
All good, but they want to be able to generate a list (report or on screen) of all those who has received OT and their balance to date, with he/she with the least OT first and ascending from there. In a report I can easily use the sum function in the section footer but how can I sort by that? Or, harder yet, how can I add the numbers in a column in a table/query since the field which contains the "OT hours assigned" will be for each assignment?
So, I guess I need to add a given field value to the other values for a running balance (of coarse this will need to be seperated by each employee).
Thanks
Jim
View 2 Replies
View Related
Jan 9, 2008
Ok, I reckon there's a gremlin in this damn db...
For a form, i have a series of check boxes. One of these had a & symbol in the name, i originally had this working, but with some extra functionality added it no longer became possible, as it recognised it as a special character. The checkbox, and relating table reference was Inform_Q&FS I changed all references of it to Inform_QFS. However, im getting a parameter window pop up asking for the original reference. I've tracked it down to a point between a button being clicked and the begining of the following forms load Sub. The point of the button method triggering the parameter window is the line where the button changes the subform to the new form.
Here is the db..
Could somebody please take a look and see whats going on... im starting to get really frustrated with databases. :(
Also, any general comments regarding the db are welcome, as i'm assuming im doing things the right way there. and excuse the messy coding
View 4 Replies
View Related
Sep 18, 2005
I have a table with data of people, in which table two fields contain two (not necessarily different) jobs.
I want to build a query (and later a report based on that query) which will return the name, address, phone of the person, plus only the field of the job that I asked for it.
when executing the query, the user should enter the asked job in a popup-box using the below formula.
Like "*" & [job] & "*"
Note, that there may be records containing in both job fields the same job. I want to get the field only if it contains the asked job.
Any ideas?
Thanks
View 12 Replies
View Related
Aug 19, 2004
When you run an Update Query using RunSQL, it always comes up with a box telling you the number of records you are updating and if you want to update. Is there a way to stop this box coming up and just perform the query.
Ed
View 1 Replies
View Related
Jul 28, 2005
I'm not looking for your expertise in "how to" do this (not yet, anyway) but a friend asked me if Access could do certain functions. Like "automatically fill-in some of the
more routine letters/forms such as basic letters of
representation, medical bill/record requests"
(routine for his biz) and "basic calendaring
functions, such as keeping track of monthly deadlines, reminders, and other
important dates."
I figured that if so, the app would have to be running in order track deadlines and such.
So, are these things that are Access able functions?
Tx
-Jim
View 3 Replies
View Related
Oct 10, 2013
I have a db that is having some strange speed issues on some very basic queries. Objects that have a rowsource/recordsource with a SQL statment in particular are really slow to populate. Likewise on deactivate/activate the report query seems to reload. I've put breakpoints in every object event with no stops out of the ordinary, and nothing seems unusual.
While I know MSysObjects is a user read-only table, I came across some records that reference objects that no longer exist in the front-end. Is this table cumulative? Is there any way to purge the deprecated records? I tried to turn on then turn off autocorrect features hoping that would trigger it to repopulate, but no luck.
I'm thinking this may be the source of the issue. Perhaps if it is looking for an object that it can not find (especially the ~sq_ unsaved queries) then it's looking to the wrong place on a lostfocus/activate/deactivate or similar event.
Some history on this file, it has been through many versions of Access starting with 2003, which I think is part of the issue as well. Shy of looping every object and replicating the read-write properties, I'm not sure where else to go with this.
View 2 Replies
View Related
Nov 13, 2005
Is there a way within this forum I could view all my questions/posts asked at the same time?
Thanks.
View 1 Replies
View Related
Sep 12, 2005
Trying to fix a simple problem with some tables.
In my department, we recently switched servers and from Windows 98 to Windows 2000. We had a database that got converted somehow during the transition. One person didn't get their computer switched until about a month later.
In essence we had 2 databases of the same information going for a while. Now everyone has the same database. Problem is the following:
Simply put:
We have 10,000 records autonumbered in one of the databases. The other database has 9,500 with the last 100 or so being information that the 1st database does not contain. How can I update my main table to have all 10,100 records? I have tried an append query and it doesn't seem to be working right. I have also tried to 'find unmatched' but can't seem to make that work either. There has to be an easy solution to make it work in one step.
Any help would be great. Thanks in advance. :confused:
View 1 Replies
View Related
Mar 26, 2014
I am in the process of making some changes to an inherited database. One of the things I need to do is to fix an issue with the reports. The reports have a field which asks for the data range (from xx/xx/xx to xx/xx/xx) as soon as the report is opened, but then the query that fills that report also asks for the same data range so you end up entering it twice.
What do I need to do to enter the data range only once and have it show up on the report and also be used on the query?
View 3 Replies
View Related