473,320 Members | 1,841 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,320 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 1405
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...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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: 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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.