简体   繁体   中英

How to move current record from a form to another form in access?

I would like to move the current record meaning all the field for the current person in that form to another form which is one table to another table via forms. Using one command button. How can I do that?

I am thinking to use add & delete action to put in one button as it look like another way of moving too. But I have no ideas how to put only one record which is from the current person in that form. something like "current session"

In access.

Basic step ..

Assume that you have Datagrid control named dgvMember in Form1 and dgvNonMember in Form2

You can create button named btnMoved that have click event like this ..

Private Sub btnMoved_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMoved.Click

//retrieve currentrow info from dgvMember -- all column as datagrid.row

//put the retrieved row to dgvNonMember -- directly to table/datasource

//it's now safe to delete selected row in dgvMember

End Sub 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM