473,441 Members | 1,438 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,441 software developers and data experts.

I get error code 2467 when trying to reference a subform

Seth Schrock
2,965 Expert 2GB
I have a main form that has two subforms. In the main form's OnLoad event I have code that references both subforms to set their allow additions, edits, and deletions to true or false depending on certain criteria.
Expand|Select|Wrap|Line Numbers
  1. With Me.sfrmEarlyDisclosures.Form
  2.     .AllowEdits = False
  3.     .AllowAdditions = False
  4.     .AllowDeletions = False
  5. End With
  6.  
  7. With Me.sfrmAppraisals.Form
  8.     .AllowEdits = False
  9.     .AllowAdditions = False
  10.     .AllowDeletions = False
  11. End With
For some reason, I get error code 2467 - "The expression you entered refers to an object that is closed or doesn't exist" when running line 1, but not line 7. Neither subform has records (yet), so that isn't the difference. At first I thought that maybe the subforms didn't load until after the main form's OnLoad event, but then line 7 wouldn't work either. I'm not sure what else to look for setting wise to make it work.
Apr 5 '13 #1
2 1408
Seth Schrock
2,965 Expert 2GB
UPDATE

I did further testing and it still doesn't work (same error) in the main form's OnCurrent event.
Apr 5 '13 #2
Seth Schrock
2,965 Expert 2GB
Fixed it. I missed transferring that table over to the new BE. Since there was no recordsource for the form, it didn't load the form and therefore the .Form didn't exist.
Apr 5 '13 #3

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

Similar topics

0
by: MLH | last post by:
In Access 97, I run the following command... DBEngine.CompactDatabase FullPathNfilename, "c:\MyDir\tocodata.sys", DB_LANG_GENERAL Error 3356 "You attempted to open a dtaabase that is already...
1
by: kscdavefl | last post by:
When I try to display the fields associated with a table using the following code: private void fieldsButton_Click(object sender, System.EventArgs e) { string tableName =...
3
by: Russ | last post by:
I keep getting this message "The compiler failed with error code 2000" when pressing PF5 to run Debug. This is not a compile error, it gets past the compile. I get this when it tries to load up my...
1
by: יוני גולדברג | last post by:
Hi, While trying to create new directory i recieve the following error message: "System.IO.DirectoryNotFoundException: Could not find a part of the path "\\premfs16\sites". The path exists, even...
0
by: jeffpriz | last post by:
We've got an issue here where we regularly receive an error page with the message "Compiler Error Message: The compiler failed with error code 2000." when we begin debug on our projects. The...
4
by: marklawford | last post by:
Hi guys, I'm getting the following error message when trying to run a MERGE statement I'm putting together. The syntax looks right to me But i must be missing something. The "srce" table...
2
by: ticars | last post by:
I'm getting a weird error when trying to access a user control from within a base page during runtime. Here's what I have: I have a master page with a user control on it. I then have a few...
13
by: apartain | last post by:
I searched the Help files and found that you can get around the #Error result when trying to calculate data from a subREPORT which has no data with the HasData property, but can not figure out how to...
3
by: dmorand | last post by:
I'm trying to copy a file which is located on my C drive over to a network path. I'm getting the error below when trying to perform the copy. The file C:\query.sql does exist on my C drive so I'm...
0
by: t0rmed | last post by:
I am currently creating my project for visual basic, which is particularly a database. However, error code 3021 shows up when I click delete even though I do not have a database. How could I solve...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.