我只想知道如何制作一个连续不断的问卷表格,一旦所有问题都填好后,将更新所有表格。 但是,在它到达网页末尾之前,用户将能够从表格到表格进行前后编辑。
将是这样的:
- Total 30 forms
- One form only update 1-3 fields in the table
- Once the user finished with one form, the form will close and open another form.
- The user will be able to back to previous form and edit it.
- The buttons that it available only 2 buttons back arrow and next arrow(save data and move to another form and close current form)
- The last form will save all the data.
- When user finished all the question, the form will allows to be reopened from the first one and it will insert entirely new line of user data in table.
我所做过的是
- I create a form, with a box and tag, connected directly to the table, so it will updated in real time. so user can back and forth to edit it
- "Next" button, using macro to close and open new form.
使用降压 VB 代码更新表格的最终格式:
Private Sub Close_Click() CurrentDb.Execute "INSERT INTO Demographics(vid, cid, dobd, gend, heght, heght2, wgt, wgt2, lschool, secschl, qualify, hqlify, army, abranch )" & _ "VALUES( " & vid1 & " , " & cid1 & " , " & dobd1 & " , " & gend1 & " , " & heght1 & " , " & heght21 & " , " & wgt1 & " , " & wgt21 & " , " & lschool & " , " & secschl1 & " , " & qualify1 & " , " & hqilfy1 & " , " & army1 & " , " & abranch1 & " )" cmdClear_Click cmdClose_Click End Sub Private Sub cmdClose_Click() DoCmd.Close End Sub Private Sub cmdClear_Click() vid1 = "" cid1 = "" dobd1 = "" gend1 = "" heght1 = "" heght21 = "" wgt1 = "" wgt21 = "" lschool1 = "" secschl = "" qualify = "" hqlify = "" army = "" abranch = "" End Sub Private Sub Form_Current() End Sub
问题:
- Final page script above wouldnt insert the data into the table at all.
- It can insert data into table, if i indexed the column in the table, but it will end up messy if i did a lot of updates
我的问题:
- Can anyone suggest me the correct VB script to do this continuously form activity, instead of update entire table per-form.
- How do I create a form like in access 2003 on which i can create switchboard with login for user only, and special login access to the database only for administrator, so it will like an application. (im using Access 2010 .accdb file)
sorry for the long post, just want to make sure everything is clear, any answer would be greatly appreciated. Thank you in advance