Solved

object variable or with block variable not set

Posted on 2003-11-16
6
1,678 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
hit enter key to run macro 13 23
Reference theme colors in VBA 4 24
Trying to open Visio 2013 from a ms access 2016 database 9 31
object variable or with block not set 6 28
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
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 …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

776 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