Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

object variable or with block variable not set

Posted on 2003-11-16
6
Medium Priority
?
1,683 Views
Last Modified: 2007-12-19
Hello and good luck!

I am creating a database for our departments aircraft flight activity. It is comprised of about 15 different tables that track everything from personnel, flight hours, flight activities and so on.

My difficulty is this. The different tables are updated by users through a complex form. The main form (frmFlightInfo) captures data relevant to each flight. A subform (sfrmFlightDetails) captures data relating to each individual event during that flight. This form has several nested subforms on it which update their respective tables.

Everything is now functioning correctly on the forms and all the subforms display the correct info. My problem is that when I click on one of the nested subforms (3rd level), open properties and select data and then attempt to open the dialog box to adjust the linking (Main form, Child Form) - I get the error message . . . "object variable or with block variable not set". I can manually change the linking fields, I just can't get the dialog box to open.

I thought this was no big deal at first, but now that I am attemtping to query data and set up reports, I am finding the data is not linking. In looking at the tblFlightInfo and tblLightDetails, I see there is no data in the fields that I used to link. I have "EventID" set as the linking fields in all these 3rd level nested forms, but their value in tblFLightDetails is empty. I also have my relationships setup, however, I don't know how accurately.

Does anyone have an idea why I am getting this error message, and more importantly, why the data is not linking anywhere except on the Form-Subform?

Also, I have several subforms attached to the main form (frmFlightInfo) that I am able to bring up the field linker box on. They all are storing data correctly. The same goes for sfrmFlightDetails. The problem is isolated to the subforms on sfrmFlightDetails.

I don't know if it makes a difference, but these forms are contained on tab-form with frmFlightInfo and its subforms on the first tab. sfrmFlightDetails and the 3rd level subforms are on the second tab.

Thanks, sorry for the short novel!
0
Comment
Question by:caughron
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 5

Accepted Solution

by:
peterpuscas earned 1500 total points
ID: 9765581
it looks like you have a wrong name for an object as property for another one
try tools/databaseutilities: repair/compact
check the properties for the forms, controls

Peter
0
 

Author Comment

by:caughron
ID: 9782277
I've tried that and it still is producing the error?
0
 

Author Comment

by:caughron
ID: 9782355
Also, if I open just the 2nd level subform (sfrmFlightDetails) outside of the 1st level form (frmFlightDetails), I am able to open the Form Linker dialoge box with no error for the nested subforms. It is when I open frmFlightDetails (that contains all the levels) is when I get the error.

Thanks for the help.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:Lcassine
ID: 10352435
I am experiencing exactly the same problem as described here.  Does anyone have a solution for this problem?
0
 

Expert Comment

by:trcannon
ID: 10441586
So Am I!!!  Any help would be GREATLY appreciated
0
 

Expert Comment

by:trcannon
ID: 10442713
I don't know if this will help anyone...but I had the exact same problem with a nested subform where the "plus sign" no longer showed up to drop down to the nested form.   In the design view, I received this same error when tryiing to change the relationship between the child and parent.  That is when I noticed that I had a totally blank record in my database, which shouldn't be allowed because of required fields.  I still don't know how this  record was saved, but when I deleted it the whole problem was fixed.  Weird!  But I thought I should share this.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question