WhatI need for the user of my program to click on a button on the switchboard and it automatically imports a delimited text file. I know that is easy to do with a macro and the TransferText option, however my problem is a little more involved. Every user will be importing their file from a different location. Which means, when they click on the button I need the a browse function to appear. This is the code I have written to do that:
On Error GoTo Error_OpenCmd
DoCmd.RunCommand acCmdImport
Exit_OpenCmd:
Exit Sub
Error_OpenCmd:
MsgBox Err & ":" & Err.Description
Resume Exit_OpenCmd
Once the file is found and the user clicks "import" it starts to go through all of the import specifications. I want to set all of the speciications for the user so that there are no problem importing the file. So basically what I need is for the user to be able to click on a button on the switchboard which will then open a browse function, and when the file is found, then click on import and the file is automatically imported into a table. I know this has to be possible, I just have no idea how to do it. I would truly appreciate any help.
On Error GoTo Error_OpenCmd
DoCmd.RunCommand acCmdImport
Exit_OpenCmd:
Exit Sub
Error_OpenCmd:
MsgBox Err & ":" & Err.Description
Resume Exit_OpenCmd
Once the file is found and the user clicks "import" it starts to go through all of the import specifications. I want to set all of the speciications for the user so that there are no problem importing the file. So basically what I need is for the user to be able to click on a button on the switchboard which will then open a browse function, and when the file is found, then click on import and the file is automatically imported into a table. I know this has to be possible, I just have no idea how to do it. I would truly appreciate any help.