I have seen several posts on this issue and taken the tips to heart, so thanks for that. However, I am renewing my VBA knowledge as I haven't used it in over 5 years so I am not sure why the following code isn't working:
Option Compare Database
'The button on the switchboard will gather the modules for each Group and automatically append each worksheet
'to its related table
'Duplicates are allowed
Private Sub cmdButton_Click()
'to append student Data to database
DoCmd.TransferSpreadsheet acImport, , "Students", "G:\Databases\Kelly DB\!TestImport", strFolderName, True, "Worksheet Students!A1:I23"
'to append the FA03 Scholarship Data to database
DoCmd.TransferSpreadsheet acImport, , "FA03", "G:\Databases\Kelly DB\!TestImport", strFolderName, True, "Worksheet FA03!A123"
'to append the SP04 Scholarship Data to database
DoCmd.TransferSpreadsheet acImport, , "SP04", "G:\Databases\Kelly DB\!TestImport", strFolderName, True, "Worksheet SP04!A123"
'to append the FA04 Scholarship Data to database
DoCmd.TransferSpreadsheet acImport, , "FA04", "G:\Databases\Kelly DB\!TestImport", strFolderName, True, "Worksheet FA04!A123"
'to append the SP05 Scholarship Data to database
DoCmd.TransferSpreadsheet acImport, , "SP05", "G:\Databases\Kelly DB\!TestImport", strFolderName, True, "Worksheet SP05!A123"
End Sub
___________________________________________
This is just the test application, but I know I am missing some things, so help is appreciated.
Thanks!
Kendra
Option Compare Database
'The button on the switchboard will gather the modules for each Group and automatically append each worksheet
'to its related table
'Duplicates are allowed
Private Sub cmdButton_Click()
'to append student Data to database
DoCmd.TransferSpreadsheet acImport, , "Students", "G:\Databases\Kelly DB\!TestImport", strFolderName, True, "Worksheet Students!A1:I23"
'to append the FA03 Scholarship Data to database
DoCmd.TransferSpreadsheet acImport, , "FA03", "G:\Databases\Kelly DB\!TestImport", strFolderName, True, "Worksheet FA03!A123"
'to append the SP04 Scholarship Data to database
DoCmd.TransferSpreadsheet acImport, , "SP04", "G:\Databases\Kelly DB\!TestImport", strFolderName, True, "Worksheet SP04!A123"
'to append the FA04 Scholarship Data to database
DoCmd.TransferSpreadsheet acImport, , "FA04", "G:\Databases\Kelly DB\!TestImport", strFolderName, True, "Worksheet FA04!A123"
'to append the SP05 Scholarship Data to database
DoCmd.TransferSpreadsheet acImport, , "SP05", "G:\Databases\Kelly DB\!TestImport", strFolderName, True, "Worksheet SP05!A123"
End Sub
___________________________________________
This is just the test application, but I know I am missing some things, so help is appreciated.
Thanks!
Kendra