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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|