Base - relationships

FamiliaFrazelle <[email protected]>
Newsgroups gmane.comp.openoffice.dba.user
Organization Familia Frazelle
Message-ID <[email protected]>
i hope this is the correct forum for this...

   i'm still trying to get this to work...

   i've created two tables: Dates and Visits.  This is a bare-bones 
setup to see if it works.  The idea is to input info from visits to 
homes into the Visits table.  Since many visits to homes are made on the 
same day, it would seem reasonable to NOT include the visit date in the 
Visits table, but make a separate table for it and relate it to the 
Visits table in a one-to-many relationship.
   If i can get this to work, it would also seem reasonable to remove 
the Neighborhood name and the Street name from the Visits table and 
place them in separate, individual tables as well, since they are 
repeated values in the Visits table (many addresses on the same street 
and many addresses in the same neighborhood).

   So, i created the following:

Dates table
IDDates, Primary, Integer, Autoincrement
Dates, DateType

Visits table
IDVisits, Primary, Integer, Autoincrement
Street, Text
FKDate, Integer, Input not Required

   My questions are these:

   Are these sufficient fields? If so, how should i Relate them in the 
Relationships window so that when i input a new date in the Dates Table 
the corresponding Foreign Key in the Visits Table will automatically 
receive a new value?

   i've created these tables and the relationship in Tools, 
Relationship, and then tried to create a form but when i got to input 
info through the form, i can input the first date and the FKDate control 
appears as 0 (zero) which is correct and corresponds to the first 
IDDates value.  Then, i can continue to input new records alright.  But, 
when i try to input another date, the control will accept it, but when i 
change to the Visits area, the FKDate field doesn't increment to a new 
value, it remains zero.  What am i not doing correctly?  Or is Base not 
capable of this type of input?

Have a great afternoon! :)
smime.p7s (application/x-pkcs7-signature, 3.2 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.