Topics Search

Run-time error 3464

Run-time error 3464
Views: 15
I have an Invoices form (frmInvoices) which has a sub form linked to it (subfrmInvoiceDetails). These get their data from the two tables, tblInvoice and tblInvoiceDetail. Basically, I would like to take the subtotal of the subform and write that value to the main form (value to be stored in the table). I have written the code below, but I keep getting the error Run-time error 3464: Data type mismatch in critical expression. If I debug the code, the last line of code has the following message: rst!SubTotal = <Object variable or With block variable not set> Any ideas of what I am doing wrong?

Private Sub Form_AfterUpdate()
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT tblInvoiceDetail.INoID, Sum(tblInvoiceDetail.Total) as SumOfTotal FROM tblInvoiceDetail GROUP BY tblInvoiceDetail.INoID HAVING (((tblInvoiceDetail.INoID)='" & Form_frmInvoices.INoID & "'));")
Form_frmInvoices.txtTotal = rst!SumOfTotal
Sponsored Links:

Similar posts...

 

Run-time error 3464: Data type mismatch error

Run-time error 3464: Data type mismatch error Icon
The database that applies the following code has had a recent change:

strSQL = "SELECT * FROM [KT VANPOOL DRIVER RECORDS] WHERE [ACTION] = " & Forms![KITSAP TRANSIT DRIVERS].[ACTION]

The change was formatting the [ACTION] field from an number to a text format. Doing so would allow an alphanumeric input in this field on a Form.

This change has resulted in the following error:

"Run-time error '3464': Data type mismatch in criteria expression."
 

Error 3464 Reserved Error

Error 3464 Reserved Error Icon
As the title says, I'm running into this error while trying to open a report:

Error 3464 Reserved Error

[CODE]

Edit: I noticed the same code works perfect in Access 2007.
 

run-time error '3464' - Data Type Mismatch

run-time error '3464' - Data Type Mismatch Icon
I am trying to sum up a list of invoiced items (data stored in table tblInvoiceDetail) and write this value to the Total field in the table tblInvoices. I want this to update after each record is typed in the subform. I was given the below code from friend, but neither of us can get it working. Everytime we change a value in the subform, we get the error Run-time error 3464; Data type mismatch in critical expression. Any idea of where I am going wrong? Or can you give me code that I can use?

Private Sub Form_AfterUpdate()
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT tblInvoiceDetail.INoID, Sum(tblInvoiceDetail.Total) as SumOfTotal FROM tblInvoiceDetail GROUP BY tblInvoiceDetail.INoID HAVING (((tblInvoiceDetail.INoID)='" & Form_frmInvoices.INoID & "'));")
Form_frmInvoices.txtTotal = rst!SumOfTotal
 

Date/Time field, prevent duplicates - Runtime error 3075

Date/Time field, prevent duplicates - Runtime error 3075 Icon
The error that I'm getting is a run-time error 3464.

I have the following code to prevent duplicate dates. If the date is a duplicate, it'll bring up a warning message and take me to the record that already exists.

[CODE]

However, the data type in the table is set to date/time because I want the field in the form to show a calendar and prevent users from inputting an incorrect date format.

When I changed the data type to text, However, when I change the data type to date/time, it no longer works. I know it has something to deal with using an # orsomething,
 

SELECT query Data type mismatch error

SELECT query Data type mismatch error Icon
StrSQL = "SELECT * FROM [KT VANPOOL DRIVER RECORDS] WHERE [ACTION] = " & Forms![KITSAP TRANSIT DRIVERS].[ACTION]

The change was formatting the [ACTION] field from an number to a text format.

This change has resulted in the following error:
"Run-time error '3464': Data type mismatch in criteria expression."
 

Return to last created record after On_Click

Return to last created record after On_Click Icon
Trying to requery my form and come back on the last created record, however I get a data type mismatch in criteria, run-time error 3464

Pretty new to this so I hope someone might help.

The code;


Private Sub List203_Click()

DoCmd.RunCommand acCmdSaveRecord

Dim returnID
returnID = Me!ID
Me.Requery
Me.Recordset.FindFirst "ID = '" & returnID & "'"
 

Sending Outlook E-mail - Run-time error '429'

Sending Outlook E-mail - Run-time error '429' Icon
I copy and pasted this code from another one of my DBs that was executing it just fine. Now I get run-time error 429. I do have MS Office 2010. However, I had Excel 2003 installed on my machine because some of our software is only compatible with 2003. Ever since then I've been getting this run-time error. I have all the libraries referenced. Does anyone have a solution for this?
 

Error "Run-time error '1004': General ODBC Error

Error "Run-time error '1004': General ODBC Error Icon
I'm having trouble running a file that I run weekly, when running the update query I receive error message: "Run-time error '1004': General ODBC Error

When I run debug, it fails at the 2nd line of code below:
....

My excel links the CCL data from Access via the below details and from what I know, nothing has changed. I've googled the error and it seems to mention an awful lot that there could be a problem with the link but I'm very inexperienced with Access and not quite sure where I should be looking.
 

Run-time error-214735267 (80020009)

Run-time error-214735267 (80020009) Icon
Run-time error-214735267 (80020009)
You can't assign a value to this object.

That is the error message I am getting for attempting to increase the value of a field when another field is true.

And now, I am getting the error:
"Run-time error '2465'

Microsoft Office Access can't find the field ' ' referred to in your expression."

The space between the apostrophes is for a symbol that I cannot find outside of the box. It is a straight vertical line.
 

Run Time Error 1004

Run Time Error 1004 Icon
I have code which outputs data into Excel on to separate sheets, I have also been asked now to give a combined sheet and every now and again I come up against Run Time Error 1004, I believethis is due to copy and pasting to many times, but when I am running the code it is only being run 4 or 5 times at the moment.

I am not sure what to add in to prevent the error from happening.

The extract of code is shown below.
 
Sponsored Links: