By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,688 Members | 1,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,688 IT Pros & Developers. It's quick & easy.

Problem with subform when paratmeter query returns NULL

P: n/a
Hi There,

I have a main form that with a subform which is based on a parameter
query. I have 2 controls on the main form [OpenDate] & [Close Date]
which are used as parameters in the query. It all works fine and dandy
until the query returns no records. The main form just "whites out"
(probably due to the background coulor set to white!) when I get no
records. I have coded and error message in the subform for when no
records are returned and that doesn't show up either. It does however
work if the subform is opened independently. I have tried coding the
main form with the error message but again the white out prevails.
All I want if i get no records is that an error message pops up and
stes the foucs to the date controls.

Can anyone tell me what is going on please.

Cheers,

John

Oct 25 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

Macbane wrote:
Hi There,

I have a main form that with a subform which is based on a parameter
query. I have 2 controls on the main form [OpenDate] & [Close Date]
which are used as parameters in the query. It all works fine and dandy
until the query returns no records. The main form just "whites out"
(probably due to the background coulor set to white!) when I get no
records. I have coded and error message in the subform for when no
records are returned and that doesn't show up either. It does however
work if the subform is opened independently. I have tried coding the
main form with the error message but again the white out prevails.
All I want if i get no records is that an error message pops up and
stes the foucs to the date controls.

Can anyone tell me what is going on please.
I have a feeling you're not using the LinkChildFields and
LinkMasterFields properties of your subform. I'm assuming that you
want your subform to return related records based on values in your
main form which is why you created the parameter query as the source
for your subform. Look up the LinkChildFields and LinkMasterFields in
online help. You should be able to accomplish the same task without
using a parameter query.

Bruce

Oct 25 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.