query ignores form record if related subform has no record (1 Viewer)

sigma788

Registered User.
Local time
Today, 05:23
Joined
Dec 1, 2009
Messages
40
hi everyone. currently i am facing a problem and would appreciate some assistance.
the situation is that i have a main form , a sub form and a print button at bottom.

the print button print the related record based on query with a filter.
the problem arises when the sub form does not have related record as it is not required that each customer should have related record in sub form.

it needs at least one record to show the required record in query.
i hope i have explained the problem.
i have attached the short version of my database to emphasize mainly the problem.
 

Attachments

  • prob_db1.zip
    95 KB · Views: 117

MStef

Registered User.
Local time
Today, 13:23
Joined
Oct 28, 2004
Messages
2,251
Hello London Estate!
Here it is, (attachment, zip).
I added a "qryCustomesOrders", I change query "Invoices".
Open form "Orders" and try.
 

Attachments

  • prob_db1.zip
    82.9 KB · Views: 103

sigma788

Registered User.
Local time
Today, 05:23
Joined
Dec 1, 2009
Messages
40
Thanks... i really appreciate it.
Now the Qry shows the record.

Also can u Plz brief me about it, how u did it. and now which Qry should i used to print the record.
 

MStef

Registered User.
Local time
Today, 13:23
Joined
Oct 28, 2004
Messages
2,251
"Also can u Plz brief me about it, how u did it. and now which Qry should i used to print the record."
I need some more details, what do you exactly want.
 

sigma788

Registered User.
Local time
Today, 05:23
Joined
Dec 1, 2009
Messages
40
Leave it , my problem is solved.

But one more question regarding report.
is it possible to hide(do not print) expense block in rpt_Invoice if it is empty.
e.g for record 5,6 print only Dates and hide Labels(dates,Expense,amount,done by) & blue border+line below it.

if it cannot be done than print text such as Not Available.

Thanks in advance.
 

MStef

Registered User.
Local time
Today, 13:23
Joined
Oct 28, 2004
Messages
2,251
Yes, you can hide some fields, or cancel the whole line in the report.
Click on Detail ( or Page Header, or Page Footer) in the report, than click
on Properties, there you can see ON FORMAT event, and ON PRINT event.
You cna put a Sub (Event procedure), and in the Sub, you can to hide or
cancel (what you want).
 

sigma788

Registered User.
Local time
Today, 05:23
Joined
Dec 1, 2009
Messages
40
If it would not be a problem Plz tell me both options i.e

1)- Do not print the the whole expense block if empty but print rest of the details.
2)- Print txt N/A in that block (under each label) or a single txt N/A.
 

MStef

Registered User.
Local time
Today, 13:23
Joined
Oct 28, 2004
Messages
2,251
I need some more details. Tell me how yor report needs to look like.
 

sigma788

Registered User.
Local time
Today, 05:23
Joined
Dec 1, 2009
Messages
40
This is the picture of the options i mentioned in previous post.
 

Attachments

  • rpt_invoice.JPG
    rpt_invoice.JPG
    33.2 KB · Views: 104

MStef

Registered User.
Local time
Today, 13:23
Joined
Oct 28, 2004
Messages
2,251
Ok, here it is (attachment, zip).
Try with report "Invoice" and "Invoice1".
I think it is what you need.
 

Attachments

  • prob_db1.zip
    90.4 KB · Views: 105

Users who are viewing this thread

Top Bottom