Updating link table

rainman89

I cant find the any key..
Local time
Yesterday, 19:20
Joined
Feb 12, 2007
Messages
3,015
Hi all,
My problem today is I am trying to update my link table, based on entries in my form.

LocOwn (PK)
LocationID
OwnerID

What is happening is my linktable will create a new entry for the location, allow me to add a single owner, but when i try to add another owner to the same location it is overwriting the existing entry instead of creating a new entry.

Is there a way for it to link to both the locationID and OwnerID so if either of those change it will create a new entry? i believe it does that now for location

I dont know how to properly implement a link table, so any help would be much appreciated. ( and if there are any places i can be pointed too about link tables that would be helpful too)
 
Hi,

Try Here
Hope that's what you're looking for.
snip
Hi all,
My problem today is I am trying to update my link table, based on entries in my form.
I dont know how to properly implement a link table, so any help would be much appreciated. ( and if there are any places i can be pointed too about link tables that would be helpful too)
 
Its not! but thank you anyways. i just need to know how to increment a link table each time a either of the FKs in the table change. I think i might just force it to do it if i dont hear anything from you all
 
AH 3 hours later and im still stuck. if its an autonumber field and i want it to change just the ownerID when i select a seperate one how do i go about this? i can get the location fine, but the ownerid simply rewrites
 
Hi,

Your question is generic, it's difficult to quess want you want to do.
A simple one would be, say......

strField = len(table.column,-3)
if table.column1 <> strField then
field1 = field2
end if

or

a subroutine or function to loop thru the record and compare.

I suggest a sample code, maybe somebody might have a better solution.

AH 3 hours later and im still stuck. if its an autonumber field and i want it to change just the ownerID when i select a seperate one how do i go about this? i can get the location fine, but the ownerid simply rewrites
 
I figured it out right before i left work yesterday. Want to say thanks for your help!
 

Users who are viewing this thread

Back
Top Bottom