Birth Date information

DAPPLE

Registered User.
Local time
Today, 16:35
Joined
Apr 11, 2002
Messages
73
I have a table, most of it is populated..with exception of the Birth Date field. Instead of entering those dates manually on the table, is there a way to query them in using the social as primary key? All this information is to be reflected in the form also.
Thanks for any help!
 
Unless you've got access to the Social Security Administration's database, how are you going to use the SSN to determine their birthdate?

If you've already got the birthdate entered, you don't have to store it again (probably). Just make a query that includes both the table you need and the table with the DOB field in it, and connect them by SSN. Drag down the DOB field and it will look just like you put it in your table.

Good luck,
David R
 
David,
I have a table #2 with the ssn and birth date information only. I have table #2 with many columns - two of the headings are for birth date and ssn. only the ssn data is entered. I didn't have the birth dates in the cells when I created table #2, just the heading. Now, I'm looking for a way to zap the info from Table #1 in because both tables have a primary key (ssn). Just not sure how to do it.. and wondering if it will reflect on the form that's linked to table 2. I hope I've accuratly described my situation - still learning the access terminology.
And is it on the relationships screen when I just 'drag the field to the other table so I'll appear like it's been there all along'?
 
Okay, slow down a bit. If you've never made a query based on more than one table it's not too difficult and you'll be amazed at what you can do afterward (ok, so I was amazed 6 months ago).

You're probably using the Query Wizard to build your queries, which is fine. For future reference, on that first (second?) screen where it asks what fields you want, you can add the fields you need from one table/query, then change the dropdown to a different table/query and add fields from that.
However if you add two tables that are unrelated, or that Access thinks are unrelated, you can end up with a very strange beast called a Cartesian product. What that means is that for EVERY row in table 1, it adds an entry for table 2. So if table 1 has 350 rows and table 2 has 100 rows, you'll end up with a query with 350x100 = 35,000 rows!

There are two ways to fix this and, as you guessed, they have to do with relationships.
1) From Tools>Relationships you can define permanent relationships between tables. For instance, linking your Primary Key from your main table to the Foreign Key slot that corresponds to it on your subtable. That relationship will always be true so you can define it permanently here and Enforce Referential Integrity, etc.
2) Go into your query in Design View and you'll see at the top a smaller version of the Relationships window, or at least it looks similar. If you've got permanent relationships between the tables in your query they will be shown, which can create quite a snarl sometimes. Stretching this portion of the design window and expanding your table views can clarify this if you need to.
In either case, you 'link fields' or 'create a relationship' between the two tables by dragging one of the matching fields over its counterpart in the other table. In the permanent view you'll be asked some options to confirm. If you need to change a relationship ever, click on it, right-click and go to Properties.

If you made a query with one table and want to add another, as I suspect you have here, right-click on the grey area at the top of your query's Design View. Show Table, and choose the table/query you want to add. Nothing simpler. You can double-click or drag down fields you want to add to the display, but you probably knew that.

See if you can get that working for your DOB table and your main table. Of course if this data is a field you need to add to your main table that's a slightly different type of query. It's never easy when you're getting your data piecemeal.

Good luck,
David R
 
Thanks a million David. I printed out your response (I'll have to digest one bite at a time), and I'll put it to work! But from what I saw, it made sense. I have learned so much in a few short days. Thanks again. I'll keep you updated on my progress.
 

Users who are viewing this thread

Back
Top Bottom