Hi guys,
Sorry it was difficult to know if I should post this to forms or modules.
I have a VBA module which imports data from a CSV file into an import-buffer table. When the data has been imported into the buffer table, the code uses docmd.openform to open a form which shows all the data in the buffer.
I want to put two button-controls on the form, "Import" and "Cancel", both of which close the forum and return back to the module which opened the form, but I want the "Import" button to somehow send a True value (or similar) back. This would signify that the user has chosen to complete the import process and not cancel it. And after that, depending on whether they pressed Cancel or Import, I'll use code to move the data from the import buffer to another table.
How do I get a form to pass a value back to the module when it closes?
Thanks
Sorry it was difficult to know if I should post this to forms or modules.
I have a VBA module which imports data from a CSV file into an import-buffer table. When the data has been imported into the buffer table, the code uses docmd.openform to open a form which shows all the data in the buffer.
I want to put two button-controls on the form, "Import" and "Cancel", both of which close the forum and return back to the module which opened the form, but I want the "Import" button to somehow send a True value (or similar) back. This would signify that the user has chosen to complete the import process and not cancel it. And after that, depending on whether they pressed Cancel or Import, I'll use code to move the data from the import buffer to another table.
How do I get a form to pass a value back to the module when it closes?
Thanks