Hi!
I made a form in which the user of the form needs to enter the name of a table and its datasource. Once he has written this, I want to run a macro that inserts that table into Access
For that macro their is no problem:
PathSource = "D:\Leen"
NameInput = "railway_line_pune.dbf"
DoCmd.TransferDatabase acImport, "dBASE IV", PathSource, acTable, NameInput, "Railways_KNVL", False
But, when a user enters a name in a textbox of a form, I want, by using for example the "AfterUpdate Event" - code builder - to write code that puts the inserted name by the user as PathSource. Can someone help?
I should be something like:
Private Sub Source_AfterUpdate()
Dim PathSource As String
Set PathSource = the text entered by the user in the textbox of the form?
End Sub
Thanks a lot!
Leen
I made a form in which the user of the form needs to enter the name of a table and its datasource. Once he has written this, I want to run a macro that inserts that table into Access
For that macro their is no problem:
PathSource = "D:\Leen"
NameInput = "railway_line_pune.dbf"
DoCmd.TransferDatabase acImport, "dBASE IV", PathSource, acTable, NameInput, "Railways_KNVL", False
But, when a user enters a name in a textbox of a form, I want, by using for example the "AfterUpdate Event" - code builder - to write code that puts the inserted name by the user as PathSource. Can someone help?
I should be something like:
Private Sub Source_AfterUpdate()
Dim PathSource As String
Set PathSource = the text entered by the user in the textbox of the form?
End Sub
Thanks a lot!
Leen