A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Use one form to update different tables



 
 
Thread Tools Display Modes
  #1  
Old April 16th, 2008, 11:13 AM posted to microsoft.public.access.forms
Robbert
external usenet poster
 
Posts: 2
Default Use one form to update different tables

First of all: What i am doing is regarded as bad database design. I am
creating different tables with exactly the same structure, a normalized
situation with just one patients table would be preferred. However the data
in question is very privacy sensitive and needs to be fysically seperated
from the other data.
In this case there is a table with patients for every doctor. Now i need a
way to use one form with a different source table depending on the doctor
selected.

Can anyone help me do this?
  #2  
Old April 16th, 2008, 12:04 PM posted to microsoft.public.access.forms
Dennis
external usenet poster
 
Posts: 1,222
Default Use one form to update different tables

In the On Load event of your form you can set the record source
Me.RecordSource = "Table you wish to use"

How you get the "Table you wish to use" is up to you. A combo box on a Menu
form maybe
Me.Recordsource = [Forms]![Menu]![ComboBoxName]

"Robbert" wrote:

First of all: What i am doing is regarded as bad database design. I am
creating different tables with exactly the same structure, a normalized
situation with just one patients table would be preferred. However the data
in question is very privacy sensitive and needs to be fysically seperated
from the other data.
In this case there is a table with patients for every doctor. Now i need a
way to use one form with a different source table depending on the doctor
selected.

Can anyone help me do this?

  #3  
Old April 16th, 2008, 03:36 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Use one form to update different tables

Sorry, Robbert, but you assumption the data is any more secure by putting it
in different tables is incorrect. There are other ways to accomplish this.
The correct way would, as you say, to have one patients table with a field
identifying which doctor the patient belongs to. Then it is a matter of
which user has access to which doctor's information. That can be controlled
with your own security method. This is not at all uncommon.

Yes, you can change the row source of a form either as it is opened or while
it is opened. That depends on how your system operates, but what, really, is
the differenece between chaning a row source and filtering a query by doctor?

Don't mean to beat you up, I am only trying to help, but when you think you
have a reason to violate good database normalization rules, you are always
wrong.
--
Dave Hargis, Microsoft Access MVP


"Robbert" wrote:

First of all: What i am doing is regarded as bad database design. I am
creating different tables with exactly the same structure, a normalized
situation with just one patients table would be preferred. However the data
in question is very privacy sensitive and needs to be fysically seperated
from the other data.
In this case there is a table with patients for every doctor. Now i need a
way to use one form with a different source table depending on the doctor
selected.

Can anyone help me do this?

  #4  
Old April 17th, 2008, 11:39 AM posted to microsoft.public.access.forms
Robbert
external usenet poster
 
Posts: 2
Default Use one form to update different tables

No worries Klatuu, I agree with you and don't feel offended at all.
Separation of the tables is a requirement specified by my client. I am in
favour of normalization and will take this up with my client. I tried to
persuade her earlier but will try again.

Dennis thanks for the reply, if needed i now know how to change the record
source.

"Klatuu" wrote:

Sorry, Robbert, but you assumption the data is any more secure by putting it
in different tables is incorrect. There are other ways to accomplish this.
The correct way would, as you say, to have one patients table with a field
identifying which doctor the patient belongs to. Then it is a matter of
which user has access to which doctor's information. That can be controlled
with your own security method. This is not at all uncommon.

Yes, you can change the row source of a form either as it is opened or while
it is opened. That depends on how your system operates, but what, really, is
the differenece between chaning a row source and filtering a query by doctor?

Don't mean to beat you up, I am only trying to help, but when you think you
have a reason to violate good database normalization rules, you are always
wrong.
--
Dave Hargis, Microsoft Access MVP


"Robbert" wrote:

First of all: What i am doing is regarded as bad database design. I am
creating different tables with exactly the same structure, a normalized
situation with just one patients table would be preferred. However the data
in question is very privacy sensitive and needs to be fysically seperated
from the other data.
In this case there is a table with patients for every doctor. Now i need a
way to use one form with a different source table depending on the doctor
selected.

Can anyone help me do this?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.