JohanGduToit
Board Regular
- Joined
- Nov 12, 2021
- Messages
- 89
- Office Version
- 365
- 2016
- Platform
- Windows
Greetings Experts,
I have code on a form named "MAIN" that opens a popup form "EDGARS_FILETYPE" which contains an option selection. I want the code on form "MAIN" to wait/stop execution and only continue once a selection was made (1 of 2 options selected) on the "EDGARS_FILETYPE" popup form. Once a selection was made on the "EDGARS_FILETYPE" popup form, the code on form "MAIN" should continue with a case selection where the case value is based on the option that was selected on the "EDGARS_FILETYPE" popup form.
At the moment the popup form opens; but the code on the MAIN form continues... my attempt below updates a text box on the MAIN form containing the selected option value from the popup form. The case statement is then based on the [Text130] value on the MAIN form.
The code is obviously not the way it should be done and is not working/has no effect.
Any input would be most appreciated!
I have code on a form named "MAIN" that opens a popup form "EDGARS_FILETYPE" which contains an option selection. I want the code on form "MAIN" to wait/stop execution and only continue once a selection was made (1 of 2 options selected) on the "EDGARS_FILETYPE" popup form. Once a selection was made on the "EDGARS_FILETYPE" popup form, the code on form "MAIN" should continue with a case selection where the case value is based on the option that was selected on the "EDGARS_FILETYPE" popup form.
At the moment the popup form opens; but the code on the MAIN form continues... my attempt below updates a text box on the MAIN form containing the selected option value from the popup form. The case statement is then based on the [Text130] value on the MAIN form.
The code is obviously not the way it should be done and is not working/has no effect.
Any input would be most appreciated!
VBA Code:
DoCmd.OpenForm "EDGARS_FILETYPE", , , stLinkCriteria
Select Case [Forms]![MAIN]![Text130].Value
Case 1 'Edgars Kids
Call FormatEdgars(fWorkingPath & fName, "Sales by store last week") 'Module15
Case 2 'Edgars Adults
MsgBox "FILE FORMATTING TO BE CONFIRMED", vbCritical, "WORK IN PROGRESS"
End Select
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, "EDG_RAW", fWorkingPath & fName, False
DoCmd.OpenQuery "010-APP_STAGING_10"