473,382 Members | 1,392 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Error 2465 when referencing to a subform field

1
Hi everyone,

I got this error in Access and I really don't have any idea where it may come from...

In a form with Clients ("DB Client companies - management"), I have a subform with contracted products ("DB Client companies products - management").

In this subform, there is a button with VBA code behind (OnClick). When it's executed, I get the following error (2465):
Microsoft Access can't find the field 'DB Client companies products - management' referred in your expression.

The code that produces the error is (it's the first line of the code):
Expand|Select|Wrap|Line Numbers
  1.  Me.[Range 1 price] = DLookup("[Range 1 price]", "[S Products list]", "[S Products list]![Product code]=[Forms]![DB Client companies - management]![DB Client companies products - management].[Form].[Product code]") 
I really don't know why it appears, as I copy-pasted the code from other form (with the same expression structure, just different elements) and there it works...
I use Access 2010 on Windows 7.

I will be extremely grateful for help. Thanks in advance.

Regards,
Pawel
Feb 13 '12 #1
1 2808
MMcCarthy
14,534 Expert Mod 8TB
Try this and see if it works...
Expand|Select|Wrap|Line Numbers
  1.  Me.[Range 1 price] = DLookup("[Range 1 price]", "[S Products list]", "[S Products list]![Product code]=[Forms]![DB Client companies - management]![DB Client companies products - management].Form![Product code]")
  2.  
Feb 13 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: JMCN | last post by:
hello i receive a runtime error '2465' whenever i run my module in access 97. it says 'Run-time error '2465' OOB Reports can't find the field "DuplicatePayments' referred to in your...
2
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a main form with a continuous subform. On the main form I have a text box that references a field on the subform. What I'd like it to do is show the value...
5
by: Lyn | last post by:
Hi, this has been driving me nuts. I'm on Office 2003 SP1, Win XP SP1. I am opening a form with a number of subforms based on various tables. The subforms are populated via the main form's...
2
by: brenda.stow | last post by:
error msg " An error occured while referencing the object. You tried to run a visual basic procedure that improperly references a property or method of an object" This msg occurs everytime I add a...
6
by: MLH | last post by:
"The following unexpected error occurred in Sub CopyMySQLbttn_Click, line #250, CBF on frmVehicleChooserform. 2465: "Can't find the field 'forms' referred to in your expression. You may have...
1
by: chris | last post by:
I have a form that is labeled Document Control. On this form it calls an API Function to browse for a folder, puts its in to the text box and allows you to create a table out of the folders...
14
Frinavale
by: Frinavale | last post by:
I've been trying to test my web application using Internet Explorer 8 (release candidate 1) and have been experiencing some major problems. I'm hoping you can help me with this one. I have a...
5
by: opmandrake | last post by:
Evening guys. Here something that's been driving me nuts for the past couple of hours. I have a mainform and in it, two subforms. Normally I'd like the fields to be read-only, but if a user has...
3
by: jbrumbau | last post by:
Hello, I am trying to refer to fields on a given form from the form query's recordset, essentially from the following commands: Dim frm As Form 'Refers to the current form Dim tagName...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.