Solved

object variable or with block variable not set

Posted on 2003-11-16
6
1,677 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

911 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

23 Experts available now in Live!

Get 1:1 Help Now