Subform based on a query issues

robtyketto

Registered User.
Local time
Today, 08:33
Joined
Nov 22, 2006
Messages
21
Greetings,

Has anyone come across a problem where if you run a query via query design it retrieves results though if you run it through forms it retrieves 0 rows?

I have a subform based on a query, when in the design mode of the form to ensure im using the correct query its runs without errors and displays results.

When running in the form it displays 0 results, though setsfocus in the form and allows me to enter records.

There is no additional vba code on the form other than to hide the subform wait til a combo box selection is complete then to make it visible/enabled.

I have checked all the subform properties and they look fine and also requeried the form just in case.

Can anyone offer some advice?
Im using access 2007

Thanks
Rob
 
possible as a query it will return everything in the database

as a subform it is probably only returning recordslinked to the main form
 
I’ve noticed that something similar occasionally happens to me, and I believe the problem occurs when I use an unbound main form to pass parameters to the query that underlies my wizard-created subform. The query works fine, but the subform displays nothing – whether viewed independently, or as part of the main form. I’m not sure why, but I tend to have better luck if I create the subform manually in design view, ensure that it’s working properly, close it, and then drag-and-drop it into the main form from the navigation pane. Now, it’s likely that I’m just an idiot who can’t wield her wizard, but the less I use it, the more luck I seem to have.

I don’t pretend to be anything but a novice in Access, and I’m afraid I don’t have any brilliant ideas to offer, but I can say this: If you’ll try to articulate the details about kinds of forms you’re working with (especially whether they’re bound or unbound) and how these forms are supposed to be working together, one of the real gurus in forum will stun and amaze you with an ingenious solution.

Good luck!
 

Users who are viewing this thread

Back
Top Bottom