Post by B+ on Jun 13, 2021 16:17:43 GMT
Yes there is a way to handle multiple inputs for data entry right off main window without having to go through them in exact order and you can edit to your hearts delight until you have all the data just right!
Here is a demo of how to do multiple inputs off main window:
Here is a demo of how to do multiple inputs off main window:
'_Title "Multiple Input Menu demo" 'b+ 2021-06-11 b+ mod for JB 2021-06-13
nItems = 12 ' number of data items listed in promptName Array that has cooresponding SValues Array
' add 2 to number of data to collect for 2 menu items: Quit and Process Data
dim promptName$(nItems+1), SValue$(nItems+1) ' data item names and values in strings
' For Demo purpose only initial item names (like variables)
' Here you would list your real input intem names as prompts for INPUT
For i = 1 To nItems - 2
promptName$(i) = "Demo Input Item #" + _Trim$(Str$(i))
Next
' Remember last 2 places are reserved for Menu management
promptName$(nItems-1) = "Process Inputs"
promptName$(nItems) = "Quit"
' OK get the data inputs
Do
Cls
For i = 1 To nItems ' print menu and status of input values
Print "#" + _Trim$(Str$(i)), promptName$(i);
If SValue$(i) <> "" Then Print " = "; SValue$(i) Else Print
Next
Print: Input "Enter choice # "; choice
If choice < nItems - 1 Then
Print "Please enter, " + promptName$(choice) + " ";
Input SValue$(choice)
End If
Loop Until choice >= nItems - 1 And choice <= nItems
Select Case choice
Case nItems: Print "You quit, goodbye!": End
Case nItems - 1
' <<< could check inputs here and handle errors
GoTo [processInputs]
End Select
[processInputs]
' doit remember SValues are strings!
cls
Print "Processing Inputs now..."