=TB=
Registered User.
- Local time
- Today, 19:48
- Joined
- Aug 13, 2002
- Messages
- 68
I am using the following code to transfer text
This works fine, the code is executed via a button on a form and the imported text is show within a subform however I want to create a parent child relationship to the imported text so that when the user imports text from a new record on the main form, that imported text stays related to that main record. I have to fields within the 2 tables related but I just can't seem to to figure out how to get the main forms PK into the FK field within the table when text is imported.
Can anyone point me in the right direction
TIA
Code:
Private Sub cmdImportSerials_Click()
DoCmd.TransferText acImportFixed, "ImportSerial", "tblSerialNumber", Application.CurrentProject.Path & "\serial.txt", False
Me.Refresh
End Sub
This works fine, the code is executed via a button on a form and the imported text is show within a subform however I want to create a parent child relationship to the imported text so that when the user imports text from a new record on the main form, that imported text stays related to that main record. I have to fields within the 2 tables related but I just can't seem to to figure out how to get the main forms PK into the FK field within the table when text is imported.
Can anyone point me in the right direction
TIA
Last edited: