Pookiemeister
Well-known Member
- Joined
- Jan 6, 2012
- Messages
- 626
- Office Version
- 365
- 2010
- Platform
- Windows
First let me say that I am new to Access. I currently using Access 2010. In my table I have 10 Fields, the field names are below:
EmployeeEntry = AutoNumber
EmployeeNumber=Text
FirstName=text
LastName=text
Title=text
EmailAddress=text
workphone=text
extension=text
HireDate=date/time
Notes=Memo
EmployeeEntry = AutoNumber
EmployeeNumber=Text
FirstName=text
LastName=text
Title=text
EmailAddress=text
workphone=text
extension=text
HireDate=date/time
Notes=Memo
VBA Code:
Private Sub cmdAdd_Click()
'adds data to table
'refresh data in table
CurrentDb.Execute "INSERT INTO MaintenanceEmployees(EmployeeNumber,FirstName,LastName,TItle,EmailAddress,WorkPhone,Extension,HireDate)" & _
"VALUES('" & Me.EmployeeNumber & ",'" & Me.FirstName & "','" & Me.LastName & "','" & Me.TItle & "','" & Me.EmailAddress & "','" & _
Me.WorkPhone & "','" & Me.Extension & "','" & Me.HireDate & "')"
End Sub