Inventory Report

J

Joe Smith

I have a report that will only display information if there's a stock
qty below 10. I would like to popup the report on the welcome form
only if there's information/data(stock qty < 10) on the report. Any
ideas to make this happen? Thanks ALOT.
 
J

John W. Vinson

I have a report that will only display information if there's a stock
qty below 10. I would like to popup the report on the welcome form
only if there's information/data(stock qty < 10) on the report. Any
ideas to make this happen? Thanks ALOT.

Use an appropriate query based on the table containing the field.

Since you didn't post any information about the structure of your tables, how
the stock qty is stored or calculated, or anything about the structure of the
report, it's impossible for anyone here to figure out how to do this. More
info please?
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
J

Joe Smith

Use an appropriate query based on the table containing the field.

Since you didn't post any information about the structure of your tables,how
the stock qty is stored or calculated, or anything about the structure ofthe
report, it's impossible for anyone here to figure out how to do this. More
info please?
--

             John W. Vinson [MVP]
 Microsoft's replacements for these newsgroups:
 http://social.msdn.microsoft.com/Forums/en-US/accessdev/
 http://social.answers.microsoft.com/Forums/en-US/addbuz/
 and see alsohttp://www.utteraccess.com

The table has these two fields: Item_Description (a description of the
stock item), Item_qty (the quantity of that item).
The qty is calculated by subtracting -1 everytime the product is
ordered.

The report has a condition for the Item_qty to show only quantities <
10.

If there's any other information you need I'd be happy to provide it.

I just want to popup the report if it has any fields (the qty for any
of the items is less than 10).

Thanks.
 
J

John W. Vinson

The table has these two fields: Item_Description (a description of the
stock item), Item_qty (the quantity of that item).
The qty is calculated by subtracting -1 everytime the product is
ordered.

The report has a condition for the Item_qty to show only quantities <
10.

If there's any other information you need I'd be happy to provide it.

I just want to popup the report if it has any fields (the qty for any
of the items is less than 10).

Thanks.

Well, the information isn't stored in the report but in the table.

I'd suggest using code in the startup form's Open event to search for qty less
than 10 and open the report if so:

Private Sub Form_Open(Cancel as Integer)
If Not IsNull(DLookUp("Item_Description", "tablename", "[qty] < 10") Then
DoCmd.OpenReport "YourReportName", acViewPreview
End if
End Sub
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
J

John Spencer

Since the report won't have any records if the Item_qty is not less than ten,
you could use the reports On No Data property to cancel the report

Private Sub Report_NoData(Cancel As Integer)
Cancel = True
'OPTIONAL Message box
'MsgBox "All is well with the world. No Shortages to report."
End Sub

In the calling code you will need to trap Error # 2501 which will be generated
when you cancel the report.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

The table has these two fields: Item_Description (a description of the
stock item), Item_qty (the quantity of that item).
The qty is calculated by subtracting -1 everytime the product is
ordered.

The report has a condition for the Item_qty to show only quantities<
10.

If there's any other information you need I'd be happy to provide it.

I just want to popup the report if it has any fields (the qty for any
of the items is less than 10).

Thanks.

Well, the information isn't stored in the report but in the table.

I'd suggest using code in the startup form's Open event to search for qty less
than 10 and open the report if so:

Private Sub Form_Open(Cancel as Integer)
If Not IsNull(DLookUp("Item_Description", "tablename", "[qty]< 10") Then
DoCmd.OpenReport "YourReportName", acViewPreview
End if
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top