Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time Error 3333--(table) would have no records on the 'one' side 1

Status
Not open for further replies.

MarkGibson

Programmer
Feb 15, 2001
24
CA
I receive this error message "Records in table MasterListCodes would have no records on the 'one' side" at an odd time in my Access 97 database: I have just changed the numeric code for the industry of a particular company and in the AfterUpdate Event of the combo box I do a lookup:

Me![lblIndustry] = DLookup("Description", "IndustryMaster", "Number='" & [cboIndustry] & "'")

...in order to put the matching Industry description into a label. The result is an error in the seemingly unrelated table MasterListCodes! Similar lookups in AfterUpdate Events for other numeric codes in other tables (SectorMaster, AnalystMaster, ClassMaster) all provoke the same error. It also happens if I use the Dlookup in a BeforeUpdate, but a similar Dlookup (in the Data field of the label in question) works fine when the form opens and when I change records.

There is no relationship between the tables in question. Any suggestions? Thanks a lot!
 
When setting a value for a lable you need to set the .caption property. Even though your error is strange and doesn't seem to relate, I believe if you change it to:

Me![lblIndustry].Caption = DLookup("Description", "IndustryMaster", "Number='" & [cboIndustry] & "'")

If that doesn't work try setting a breakpoint (F9) at the line and use the debug window to run the assignment code while at the breakpoint.

?DLookup("Description", "IndustryMaster", "Number='" & [cboIndustry] & "'")

One other thing that is a little peculiar. You use the field name 'Number' but are using quotes to look for it as if it were text. Now this could easily be a valid DLookup because many people refer to a number such as a part number with alphanumeric characters. If it really is a number field then remove the quotes.

Steve King

Growth follows a healthy professional curiosity
 
Thanks Steve; you helped me think of another way to solve it. In fact, the fields in question WERE text boxes, not labels (my error in the description), so I made them labels and it worked. BTW, the "number" fields ARE actually text, but thanks for suggesting the other possible error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top