Runtime error 3075

Status
Not open for further replies.

Pookiemeister

Well-known Member
Joined
Jan 6, 2012
Messages
564
Office Version
  1. 365
  2. 2010
Platform
  1. 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
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
 
Not related to this specific error, but you should include Option Explicit as the second line in every module.
Does your regional Date format include a "." after the day value?
 
Upvote 0

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Not related to this specific error, but you should include Option Explicit as the second line in every module.
Does your regional Date format include a "." after the day value?
Good call, yes it does.
 
Upvote 0
I see...

Replace both instances of this:

SQL:
DoCmd.ApplyFilter task

With this:

SQL:
Me.Filter = strCriteria
Me.FilterOn = True
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,216,058
Messages
6,128,532
Members
449,456
Latest member
SammMcCandless

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top