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:

More topics

 

Error 3464 Reserved Error

Preview
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

Preview
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

Preview
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,
 

Data type mismatch error

Preview
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."
 

Run Time Error

Preview
All helpers
I have a problem with VBA code of "DLookup"

I am trying the following code which works well
Private Sub Price_AfterUpdate() Product = DLookup("Product", "LU Product", "Price=" & Price) End Sub
BUT
when I apply with reverse order it does not work and shows run time ERROR 3464
Private Sub Product_AfterUpdate() Price = DLookup("Pricec", "LU Product", "Product=" & Product) End Sub In the both the tables the PRICE is currency and product is TEXT
My project is only lacking and waitng for this CODE
Pleasse write down the
 

Data type mismatch error

Preview
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."
 

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

Preview
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

Preview
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.
 

Return to last created record after On_Click

Preview
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 & "'"
 

Run-time error-214735267 (80020009)

Preview
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.