473,399 Members | 3,603 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,399 software developers and data experts.

Access VBA Run Time Error 2465: Application-defined or object-defined error

I have a form named UI(Navigation Form) in MS Access 2010. I have two more subforms SEARCH and RESULTS as tabbed forms in UI. After I search in SEARCH form, when I click the RESULTS tab I want the value from a combo box named 'cmbID' in SEARCH to be displayed in a label named 'lblAIPIDDisp' in RESULTS form and then display additional labels. So, I gave the following code in the navigation Button Click Event:

Expand|Select|Wrap|Line Numbers
  1. Private Sub NavigationButton32_Click()
  2. Form_RESULTS.lblAIPIDDisp.Caption = [Forms]![UI]![SEARCH].cmbID.Value
  3. End Sub
  4.  
But I get Run Time Error 2465. So, I tried searching in SEARCH form separately and gave the following code in Form Load Event of RESULTS form:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load() 
  2. Form_RESULTS.lblAIPIDDisp.Caption = [Forms]![SEARCH].cmbID.Value
  3. End Sub
  4.  
Now, I searched in SEARCH Form and clicked on RESULTS form. I was able to see the value in Combo Box 'cmbID' in SEARCH Form in the label 'lblAIPIDDisp' in RESULTS Form. So, I think there is something wrong in referencing subforms RESULTS and SEARCH in the Navigation Form UI. Help needed in this point.
Apr 10 '14 #1
1 7089
jimatqsi
1,271 Expert 1GB
Prithvi,
Let me introduce to my go to place for questions about form-subform references. I'm sure I learned about this page from someone at Bytes, so I'm just paying it forward. This has been a fabulous resource for me.
http://access.mvps.org/access/forms/frm0031.htm

I think the one you want is this one:
Me!Subform2.Form!ControlName
In your case that would be be ... well, I can't say because I don't know the name of the control that holds your subforms. Note that it's not the name of the subform but the name of the thing that the subform is in.

Also, be sure to go to the trouble to actively choose names for all of your controls. NavigationButton32 tells you nothing about the function of that control and when you have been away from the program a while you'll have forgotten all that.

Jim
Apr 10 '14 #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...
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...
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...
3
by: ontherun | last post by:
hi, i have two forms CHS_Customer and 'CHS_Job' both have a common field, "Company_Name" i want to open the form 'CHS_Job' from the form 'CHS_Customer ' and when i open, the Company_Name field...
1
by: Gilberto | last post by:
Hello I have a big BIG problem. Im new with acces and ive been creating a db for a month now. It was working perfectly and just after i did a db SPLIT some functions began displaying error 2465. I...
2
by: zufie | last post by:
I have an Option GROUP which produces 6 different report between two dates. A separate Option BUTTON determines the period of the report once I enter the From & To Dates into the textboxes. I...
11
by: dowlingm815 | last post by:
the following code is generating an error; Mircosoft Access cant find the field '|" referred to in your expression" any suggestions would be appreciated. Private Sub...
8
by: Slamowitz | last post by:
I have as client database (Access 2000) that runs fine, but every time I either do a Repair/Compress, Import it into a new blank database or make any vba code changes to it I get a Run-time error...
1
by: Pawel | last post by:
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.