Copying Primary key to another field in Access.
        Posted  
        
            by BashLover
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by BashLover
        
        
        
        Published on 2010-05-05T08:56:19Z
        Indexed on 
            2010/05/05
            8:58 UTC
        
        
        Read the original article
        Hit count: 192
        
Hey, I'm struggling to copy the Primary Key to another field in Access. This is irrelevant , but clarifying on what I'm comparing.
... WHERE Tunniste=" & [Tarkiste] & ""
Tunniste = Primary Key , Autonumber , ID (Generated by Access.)
Tarkiste = This is the field I want to copy it to compare it.
I'm open to suggestions, I've already try'ed with Form_Load, using the following code.
Private Sub Form_Load()
DoCmd.RunSQL "UPDATE Korut SET [Tarkiste]=('" & Tunniste & "');"
End Sub
But this copied the same key to all the entries in "Tarkiste" field.
In simplicity I want 1:1 copy of field "Tunniste" to "Tarkiste" , whichever method it takes.
Started from this question. File Picker Replaces All Rows With The Same Choice.
© Stack Overflow or respective owner