PDA

View Full Version : Master/Child Link Problem



Mattster2020
04-22-2009, 11:57 AM
Afternoon All,

I have a problem on a form that I am using, when trying to link a subform I get the below error message when using the master \ child link wizard:

'object variable or with block variable not set'. My subform's datasource is based on a query.

Does anyone have any ideas of why this may occur?

Cheers,

Mattster

CreganTur
04-22-2009, 12:03 PM
I've never used that wizard before, so I'm not familiar with it. However, I am very familiar with that error message. Generally it appears when you have a With that doesn't have a matching End With, or when you have any other conditional within a With block that is missing one of its pieces.

I'd suggest compiling your code to ensure that everything is squared away there. I'll try and use a little google-fu while you do that to see if I can dig up anything else that could be causing your problem.

Mattster2020
04-22-2009, 12:24 PM
Thanks CreganTur,

Although would there be a problem with linking a subform with a form if the subform was based on fields within a query and not on the actual table itself?

The query contains data from two tables joined together.

Cheers,

Mattster

CreganTur
04-22-2009, 12:47 PM
Although would there be a problem with linking a subform with a form if the subform was based on fields within a query and not on the actual table itself?


No, that shouldn't be a problem in any way. All of the subforms I use are based on queries. In fact, I never allow my users direct access into my tables, which aligns with best practice.

So far I'm not finding anything that explains why that error would appear when using that wizard. Maybe someone with experience in this area can solve this problem.