Access DB question

Started by Monster Dave, May 04, 2010, 07:00:15 AM

Previous topic - Next topic

Monster Dave

Hey guys,

I'm having a bit of a brain fart and need some help with a database question:

I'm using Access 2007 and I have a table with Patient ID's that share relationships with other tables. I need to be able to offer the user the ability to change the Patient ID from within a form.

Any ideas what the easiest way to do that would be?

Thanks!

cyrus buelton

I'd need your Access File to see how the tables are set up before I can troubleshoot the easiest way to do this.


However, since you said "patient" I figure this must be medically related and you can't send it to me because of HIPPA Laws.
No Longer the most hated DMF Member.

By joining others Hate Clubs, it boosts my self-esteem.

1999 M750 (joint ownership)
2004 S4r (mineeee)
2008 KLR650 (wifey's bike, but I steal it)

cyrus buelton

You should just be able to change in the initial input form.......

or


Is that field locked or a auto-number?
No Longer the most hated DMF Member.

By joining others Hate Clubs, it boosts my self-esteem.

1999 M750 (joint ownership)
2004 S4r (mineeee)
2008 KLR650 (wifey's bike, but I steal it)

ryandalling

You also need to worry about linked tables using the patient number as a key. If you update the number, then the linked data in other tables would not link due to mismatch in the key.
Confused rider who doesn't know what he is even riding at the moment. (2012 URAL GearUp, 2012 Ninja 250 Racer, 1969 CB175 Racer)

Monster Dave

This is where I'm having the brain fart today.

I have a form for adding a new patient - that data includes a PTID and a screening date along with various ethnic information data.

Once that data is entered it goes (obviously) into a table that drives all info related via other tables (1-to-1 cascading). I need to offer an "Edit PTID" from a form but (here's the brain fart), how can I have a user edit the PTID without doing it from within the table itself?


Monster Dave

#5
Quote from: ryandalling on May 04, 2010, 07:35:56 AM
You also need to worry about linked tables using the patient number as a key. If you update the number, then the linked data in other tables would not link due to mismatch in the key.

Since the data cascades would that still mean that the link would mismatch?

Crap - some days this comes so easy, others (like today) I'm struggling with retarded issue.


**Edit - so I tested changing the PTID in the source table directly and the ID change did cascade down through all the linked tables.  [thumbsup]

Scratch that part off at least as an issue.

cyrus buelton

If you have one main table that drives all your sub-tables / forms, then yeah, you'd only be able to change it in the table at the top of the hierarchy.
No Longer the most hated DMF Member.

By joining others Hate Clubs, it boosts my self-esteem.

1999 M750 (joint ownership)
2004 S4r (mineeee)
2008 KLR650 (wifey's bike, but I steal it)

Monster Dave

Right, that's what I want to do but not from within the table - from within a form.

(tough day today for MD)

[bang]



cyrus buelton

I am not sure that is possible.......
No Longer the most hated DMF Member.

By joining others Hate Clubs, it boosts my self-esteem.

1999 M750 (joint ownership)
2004 S4r (mineeee)
2008 KLR650 (wifey's bike, but I steal it)

Monster Dave

If there's one thing that I've learned about building databases, it not "if" it can be done but "how".

somegirl

How about 2 separate IDs - one is your key between tables, one is the externally viewed one that can be modified?
Need help posting pictures?  Check out the photo FAQ.

cyrus buelton

Quote from: somegirl on May 04, 2010, 05:44:47 PM
How about 2 separate IDs - one is your key between tables, one is the externally viewed one that can be modified?


That's a pretty good idea.........
No Longer the most hated DMF Member.

By joining others Hate Clubs, it boosts my self-esteem.

1999 M750 (joint ownership)
2004 S4r (mineeee)
2008 KLR650 (wifey's bike, but I steal it)

Monster Dave

Quote from: somegirl on May 04, 2010, 05:44:47 PM
How about 2 separate IDs - one is your key between tables, one is the externally viewed one that can be modified?

That's not a bad idea - however, the slew of tables already in relationships are working from the PTID as the key. So adding a second ID would only muck things up.

I'm still working on it and having a better day today as far as conceptualizing the form.

cyrus buelton

Access is probably one of the worst programs ever designed.

It is confusing and just plain sucks.
No Longer the most hated DMF Member.

By joining others Hate Clubs, it boosts my self-esteem.

1999 M750 (joint ownership)
2004 S4r (mineeee)
2008 KLR650 (wifey's bike, but I steal it)

Monster Dave

Quote from: cyrus buelton on May 05, 2010, 06:36:03 AM
Access is probably one of the worst programs ever designed.

It is confusing and just plain sucks.

I wouldn't go that far. I actually really like it and have seen some amazing work done with it. You just have to be a little "creative" sometimes!