How to edit a record through a form on MS Access?

我与影子孤独终老i 提交于 2019-12-13 07:54:13

问题


I'm new to Microsoft Access and I'm having a trouble implementing something. Basically, I have a form with a combo box, some text boxes, and a command button.

What I want to do is have the user select a record from the combo box, which then populates the textboxes (I've already managed to do this). Once the data has loaded into the textboxes, I want the user to be able to edit the info in the textboxes, then press the command button so that it updates that record in the table.


回答1:


This looks like the same odd form where you had trouble with delete. It sounds like you are working from the wrong end. Create a form based on a table or query, then add a combobox to find records on the form based on the selection. There are wizards to guide you through. You will then have a standard Access form where everything works as expected. When textboxes are changed, the data will be updated as soon as you move to another record, there is no need for save, it is the default for Access.

If you wish to use non-standard unbound controls, you will need to update with SQL or stored queries.



来源:https://stackoverflow.com/questions/12551133/how-to-edit-a-record-through-a-form-on-ms-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!