Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / October 2005

Tip: Looking for answers? Try searching our database.

get rid of invalid null statements

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick - 21 Oct 2005 00:04 GMT
I have a report that will generate barcodes for each of 2 fields. If either,
or both, fields are blank I get an "invalid null" message when running the
report. How can I eliminate these invalid null messages when running the
report? The two fields are NonStockBarcode, and StockBarcode.
The report to generate the barcodes is as follows:

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
  Result = SetBarData(NonStockBarcode, Me)
 Result = SetBarData(StockBarcode, Me)
End Sub

Thanks
Patrick
Ofer - 21 Oct 2005 00:53 GMT
Ýou havent posted the function, so I don't know what you are trying to do
with the two parameter that you are passing.
If you don't want to run the function if its null then use that
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If not isnull(NonStockBarcode) then
  Result = SetBarData(NonStockBarcode, Me)
End if
If Not isNull(StockBarcode) then
 Result = SetBarData(StockBarcode, Me)
End If
End Sub
==========================
Or, the other option is, to pass a different parameter instead of null, like
0 in this example
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
  Result = SetBarData(NZ(NonStockBarcode,0), Me)
 Result = SetBarData(NZ(StockBarcode,0), Me)
End Sub
Signature

If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck

> I have a report that will generate barcodes for each of 2 fields. If either,
> or both, fields are blank I get an "invalid null" message when running the
[quoted text clipped - 9 lines]
> Thanks
> Patrick
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.