当前位置: 动力学知识库 > 问答 > 编程问答 >

VBA DAO recordest last input not showing on table

问题描述:

I have a form with several unbound text boxes. I would like to have user input information and add it to the Client table. All of the inputs work except the last "YearInput"

If it helps, prior to adding the textbox for "YearInput" the "Contact_Number" also wasn't working.

Private Sub Image15_Click()

'Add data to table

Dim rst As DAO.Recordset

Set rst = CurrentDb.OpenRecordset("Tbl_Client", dbOpenDynaset)

rst.AddNew

rst!Client = Me.txtClient

rst!Industry = Me.txtIndustry

rst!Headquarter = Me.txtStates

rst!Contact_Person = Me.txtContactPerson

rst!Contact_Number = Me.ContactNumber

rst!YearInput = Me.NumYear

rst.Update

rst.Close

Set rst = Nothing

end sub

分享给朋友:
您可能感兴趣的文章:
随机阅读: