How to easily make online surveys

  
Large to the state, small to the company and the organization's decisions are based on the questionnaire to get the bottom of the attitude towards something or a point of view. If you use paper, it will not only waste resources, but also increase the difficulty of statistics. However, with the electronic questionnaire, these problems can be solved. The following system home will introduce you how to make an electronic survey questionnaire. Example description: Recently, the leadership handed over to the office director, Lao Zhang, an urgent task to conduct a questionnaire survey of all employees within the company. The company has thousands of employees. This statistical work has been completed in a few days. It takes time and effort, and Lao Zhang is guilty. I said that the questionnaire can be published on the intranet in the form of a web page. The employee chooses to submit it on the client side. The computer automatically counts the results. Isn't this both trouble-free and efficient? Lao Zhang was happy. First of all, open a new blank document in Word, select "View → Toolbar → Web Toolbox", select the "Submit" button on the pop-up "Web Tools" window. The "Submit" button will appear in the document at the top of the form & rdquo; & ldquo; at the bottom of the form & rdquo; Place the cursor on the blank line and type or paste the content you want to investigate. Next, put the cursor in the first survey content "[Please select:] & rdquo;, select "“Web Toolbox" on the "option button" to insert a radio button at the cursor, in It is followed by the capital A, right click on the unit button to set its HTMLNname property (ie its name in the web page) to R1, the Value property (ie its value) is set to A; insert the second radio button, in It is followed by a capital B, and its HTMLNname property is also R1, the Value property is B, and so on. When inserting the four radio buttons of the second survey content, you need to set their HTMLNname attribute to R2, the other settings are the same as the button of the first question, and so on, until the four items of the last survey content are added. Select button. (Figure 1) If you want employees to fill out other suggestions for the company at the end of the survey, you can click on the “Text Area” control on the “Web Toolbox” to insert a “Text Area” control on the page. Set the HTMLNname property of this "text area" control to “yj”. Right click on the "Submit" button and set its Action property to "jg.asp", that is, the user submits the values ​​of each radio button to the jg.asp file (Figure 2). Tip: In order to easily add a radio button, we can select the “Tools & Rarr; Macro & Rarr; Visual Basic Editor” menu, select the “Insert & Rarr; Module” menu in the pop-up VBA window, edit the code on the right. The window enters the code in the diagram. Go back to the Word document window and select the “Toolbars & Rarr; Customize” menu. In the pop-up “Customize” window, select the “Order” tab and select this in the “Save in” section. For the document name, select “macro" in the "category", select the process name of the code at "command" (e.g., insert radio button ”), drag it to the toolbar with the mouse And right click on Rename and close “Customize Window”. After that, put the cursor in the position where you need to insert the radio button, click this button directly, enter the question number and then confirm, then you will automatically add four radio buttons A, B, C, D, no need to already setup. If you don't want to enter the question number and insert the radio button directly, you can delete the second line in the code and replace it with the third line. Be careful to remove the “'” in front of this line (Figure 3). Tip: To make the code work, you also need to select the “Tools & Rarr; Macro & Rarr; Security” menu, and set the security of the macro to “Low” in the pop-up window. Finally save the document as a web page file index.htm. This article saves index.htm in the D:\\123 folder. Writing a Received File Before writing a receive file, you need to create an Excel file named "ldquo; Survey Results.xls" in the D:\\123 folder. Create two worksheets in the file, one named "ldquo; ”, another name is “recommended”. Among them, the total number of people in each question in the worksheet with the name "Results", the number of A, the number of B, the number of C, and the number of D must be entered first, and the option ratio for each question is The number of options is divided by the total number of people in the question, formatted as a percentage style; the worksheet with the name "recommended" is used to store employee suggestions for the company. (Figure 4) Next, just write the receiving code. We can first create a text file in the folder of the D drive named "ldquo;123", then enter the code in the file in this file, and finally change the name of the text file to jg.asp, pay attention to the extension. To change (Figure 5). Publishing web pages and employee access pages First, install the IIS management tool on the server in the computer room. You can download an IIS installation archive on the Internet based on the server system version and extract it to a disk. Then, select “Start →Control Panel →Add or Remove Programs, select “Add/Remove Windows Components>, in the pop-up "Windows Components Wizard" window, check "Internet Information Services" IIS)” to install. If prompted to select the installation file, select the folder where the IIS installation package is located. After the installation is complete, click “ Start → Settings & Rarr; Control Panel & Rarr; Management Tools & Rarr; Internet Information Services & rdquo; command, in the pop-up window on the left side of the expansion "local computer & rarr; website & rarr; default website" Right-click on the "Default Web Site" menu and select the "Properties" menu. In the pop-up "Default Site Properties" window, select the "Main Menu" tab and click the "Browse" button to select index. The folder where .htm is located “D:\\123”, check the following option “read”“write”. Next, you also need to select the “Documents” tab and tick ““Enable default document”. If there is no index.htm in the list box, you need to click the “Add” button to enter index.htm. Finally, click the “OK" button to close the "Internet Information Service" dialog window. After the survey webpage is published, the employees open the IE browser on their respective computers, enter the IP address of the server room in the address bar, and then they can browse and answer the questions on the webpage. After the employee completes the survey submission page, the data of the survey results are also collected in the created Excel file (Figure 6). Appendix: Code <%set strConn = server.createobject("adodb.connection")strConn.open = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Investigation Result.xls") & ";Extended Properties=""Excel 8.0;HDR=Yes;"";"for i=1 to 15tmp=request("R"&i)if tmp< ;>""thenda=tmpelseda=da+"."end ifset rs = server.CreateObject("adodb.recordset")sql = "Select * From [Result $] Where Title =" & irs.Open sql,strConn,1,3if da="A" thenrs("A number of people")=rs("A number of people")+1rs("total number")= Rs("total number")+1end ifif da="B" thenrs("answer B number")=rs("answer B number")+1rs("total number")= Rs("total number")+1end ifif da="C" thenrs("answer C number")=rs("answer C number")+1rs("total number")= Rs("total number")+1end ifif da="D" thenrs(" ")=rs("A number of people")+1rs("total number")=rs("total number")+1end ifrs.Updateset rs=nothingnextif trim(request("yj" ))<>"" thenset rs = server.CreateObject("adodb.recordset")sql = "Select * From [recommended$]"rs.Open sql,strConn,1,3rs.addnewrs( "serial number")=rs.recordcount+1rs("suggestions")=request("yj")rs.Updateset rs=nothingend ifstrConn.closeset strConn=nothingresponse.write(" //")% >This article is from [System Home] www.xp85.com
Copyright © Windows knowledge All Rights Reserved