On 01/02/2013 02:45 PM, Alex Thurgood wrote:
I'm a bit lost here. Surely, the field used in your main table to show
the Member's ID in your main form should reference the Member ID of
your e-mail table, via a FOREIGN KEY relationship between your tables
? Perhaps I have misunderstood what exactly it is that you are trying
to achieve or how exactly you have structured your tables ?
If you need a value to appear in your main table, which is taken from
your email table, then use the FOREIGN KEY relationship definition.
If, however, you are inserting a value of MemberID into your e-mail
table from your main table, then you need to have the MemberID field
of your email table defined as a FOREIGN KEY reference for the main
table. You can't expect both tables to know simultaneously whether to
refer/receive at the same time, that won't happen as you would have
created a circular reference.
Your questions seem to me to be far more related to how to normalize
your data relationships than how to get Base to do what you want with
them, and would probably be better asked in a forum dealing with such
questions, but I could be misreading / misunderstanding the whole point.
Thanks Alex - Lets give this one more go around..........
I have the following -
A Members Table called 'Members' with ....
* The Key being 'RecordID'. INT, Auto,
* Plus the rest of my 70-odd fields.......... (This table comes up in
my "Main Form")
I have now added another table called 'eMail' which has .....
* The Key being 'MessageID', INT, Auto
* Plus the rest of the fields for Date, Type, Title and Message.
(All TXT)
* The final Field is called 'MembersID', INT, NOT Auto,
I have created another Form for this eMail Table and by clicking a
Button on my Main Form it pops-up on top of the Main Form. (All this is
working fine). I now want to be able to open a Members Record, press the
"eMail" Button and either add a new eMail or read the old ones.
For this I need to have the Sub-Form "Pick-up" the 'RecordID' from the
Main Form and put it in the 'MembersID' field. Then if I add a new eMail
it will have the correct MembersID with it and I can also then use this
MembersID to search for just the eMails that apply to that Member.
This is what I'm trying to do and failing!! You mention a "Foreign Key'
which maybe the answer to what I'm trying to do but how do I declare the
RecordID/MembersID Relationship?
Thanks for your patience and help!!!
IanW
Pretoria RSA
--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.