473,325 Members | 2,860 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,325 software developers and data experts.

Subform in Subform - invalid reference

I have a main form with three nested subforms (Main to Level1 to Level2 to Level3). I am attempting to access the Level2 form and continually receive an error message run time #2455 - "You entered an expression that has an invalid reference to the property Form/Report."

I have checked the control/form names and all seems to be in order. I have tried to set focus to a control going from Level 3 to Level 2 and vice versa and nothing seems to work.

All of the Parent/Child relationships are set up also in fact the form is working ie., when I select Level 2 I obtain the correct data. The issues is I have other functionality required in the form and need to access the object in VBA and have been unsuccessful. I have used a variation of the below format but this seems to be a setting somewhere that I have missed.

Formats used are:

Expand|Select|Wrap|Line Numbers
  1. set frm = Forms!main1!level1.Form!level2.Form
Jul 19 '11 #1
3 4219
ADezii
8,834 Expert 8TB
The Syntax for retrieving Data from a 3rd Level Sub-Form would be:
Expand|Select|Wrap|Line Numbers
  1. Forms![<Main Form>]![<Level 1 Sub-Form>].Form![<Level 2 Sub-Form>].Form![<Level 3 Sub-Form>].Form![Field in Level 3 Sub-Form]
Jul 19 '11 #2
Thanks but I have been using that form and have been unsuccessful. The code was in a module to improve load performance. In a module, I received that same error message after each try. So, I finally captured the form by using the form code and using the Me object. I am glad it is working but still very puzzled what this error message really means.
Jul 20 '11 #3
NeoPa
32,556 Expert Mod 16PB
Why don't you list the names of all the forms, all the subform controls, and any controls on the forms that you're trying to access. That way we can check that all makes sense or see if anything doesn't. Certainly what you have shown makes sense, but we have no way of knowing if they are references to the correct objects. More can be found on this subject in Referring to Items on a Sub-Form.
Jul 23 '11 #4

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

Similar topics

2
by: Arnold | last post by:
Hey there, I just put the following code: DoCmd.GoToRecord , , acLast in the On Open event of my form, which has 2 subforms. The following error message appears when the form now opens: ...
1
by: Bill Strass | last post by:
Problem: Access main form/subform as front end to SQL Server backend. Add/edit via subforms work fine. Not so with main form. Set up a master-detail form-subform using two views linked from SQL...
3
by: Ellen Manning | last post by:
Using A2K. I've got a mainform with a subform (subfrm1). There's a subform within that subform (subfrm2). When an amount is entered on the mainform, I want that amount to appear on subfrm1 and...
0
by: John Hunter | last post by:
I've recently had a nasty problem with the "Invalid reference to the property Form" error in subforms - nasty because it doesn't seem to consistently happen to all forms which contain the same...
1
by: Jordan Fee | last post by:
I'd like to perform some conditional formatting in the OnFormat Event of my Parent Report. This works fine, until my subreports are blank, then the invalid references start happening. I understand...
6
by: Dave | last post by:
This is the first time I'm trying this in an ADP. I'm using Access 2003 and trying to change the Apptitle Property using the below: With Application.CurrentProject .Properties("AppTitle").Value...
2
by: David W. Fenton | last post by:
I think at various times we've all encountered this problem: A subform is on a main form. From the code of the main form we refer to some property of/control on the child form thus: ...
14
by: (PeteCresswell) | last post by:
I've got a form (frmDeal) that has a subform (frmDeal_Tranche) that has a subform (frmDeal_TrancheCusip). When I try to refer to properties on the "Cusip" form at the end of the chain, MS Access...
0
by: paulodonnell99 | last post by:
Hi, I am trying to build an installer application to run on the compact framework, I want to produce a netmodule using CSC.exe, then use AL.exe to embed resouce files and produce an exe. My...
3
by: MyWaterloo | last post by:
I am trying to open my purchase orders form and go to the last record. In the on open command I do: DoCmd.GoToRecord , , acLast Seems straight forward enough...but I keep getting this message...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.