开发者

Update database with Microsoft Access 2003

Hi guys i have a f开发者_运维知识库orm with 3 tabs in it and every tab is supposed to update different table, can anyone tell how to do it with a button for every tab? Pretty much like a form built with HTML?


Access forms generally use bound data controls, which are quite different from HTML forms. If you want to use bound controls, place a sub-form on each tabsheet. Set the record source for each subform to the table you want to update. Then drop some fields from the table onto the subform.

If you want to use unbound controls, arrange some controls each tab as desired. At the bottom of each tab, place a button labeled Submit. In the CLICK event handler for each button, write code that does one of these two things:

  • Gather the values together, create an INSERT or UPDATE statement as appropriate, and have the database execute it with DoCmd.RunSQL.

or

  • Create an ADO or DAO recordset object for the row you wish to update or add and then write your values into the fields for that recordset.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜