I can run the attached sample code from an Access Module. Where do I put it in VB 6 to create an executable?? Is it necessarilly somehow embedded in a form?
Eventually, I will want to display one of 1200 documents selected through a similar hierarchy of yes/no dialog boxes. Should I use VB forms or msgboxes to dialog with the user?
Public Function DecisionTree()Dim ans_23 As IntegerDim ans_31_33 As IntegerDim ans_42_45 As IntegerDim ans_48_49 As Integerans_23 = MsgBox("Are you a general contractor, sub-contactor, or specialized contractor?", vbYesNoCancel + vbQuestion, "Please Respond")ans_31_33 = MsgBox("Are you engaged in agriculture, production, manufacturing, or mining of a product or commodity?", vbYesNoCancel + vbQuestion, "Please Respond")ans_42_45 = MsgBox("Are you engaged in buying or selling of products or commodities?", vbYesNoCancel + vbQuestion, "Please Respond")ans_48_49 = MsgBox("Are you engaged in the transportation of freight or passengers by any more including air, truck, boat, pipeline, etc.?", vbYesNoCancel + vbQuestion, "Please Respond") Select Case ans_31_33 Case vbYes MsgBox "yes_31_33" Case vbNo Select Case ans_42_45 Case vbYes MsgBox "yes_42_45" Case vbNo Select Case ans_23 Case vbYes MsgBox "yes_23" Case vbNo Select Case ans_48_49 Case vbYes MsgBox "yes_48_49" Case vbNo MsgBox "no_48_49" Case vbCancel MsgBox "cancel_48_49" End Select Case vbCancel MsgBox "cancel_23" End Select Case vbCancel MsgBox "cancel_42_45" End Select Case vbCancel MsgBox "cancel_31_33" End SelectEnd Function
Which would you recommend? Which is the better interface?
I plan to design an icon for the application. The user will launch it, and answer yes, no, yes, no... through a hierarchy to get to one of 1200 documents.
I assume that if I use a Form I could (at my option) make it look just like a yes/no msgbox depending on the selection of controls.
What's the benefit of the Console application? Is it just that it's most similar to my Access module??