Solved

object variable or with block variable not set

Posted on 2003-11-16
6
1,674 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
6 Comments
 
LVL 5

Accepted Solution

by:
peterpuscas earned 500 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
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now