Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 03-14-2019, 11:39 AM   #1
eharvilicz
Newly Registered User
 
Join Date: Mar 2019
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
eharvilicz is on a distinguished road
Form is passing a '0" to Report when combo box is left blank on form

After a MS Access Database was upgraded to 2016, a user has been experiencing an issue when launching the report preview from a form. For some reason, a '0' value is getting passed to the report even when you leave the combo box selection set to blank. This never happened in the previous version. If I select something in the combo box and then delete it, it doesn't pass the '0' to the report. I've made sure that the default value is not set to '0'. Help!

eharvilicz is offline   Reply With Quote
Old 03-14-2019, 11:52 AM   #2
Cubsm22p
Newly Registered User
 
Join Date: Feb 2018
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Cubsm22p is on a distinguished road
Re: Form is passing a '0" to Report when combo box is left blank on form

I would recommend trying to set a default for those fields in the form as a space (" "):go to property box and set a default
default.PNG
Cubsm22p is offline   Reply With Quote
Old 03-14-2019, 12:13 PM   #3
eharvilicz
Newly Registered User
 
Join Date: Mar 2019
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
eharvilicz is on a distinguished road
Re: Form is passing a '0" to Report when combo box is left blank on form

I tried that and still no luck. It indeed does not happen in the 2002 version of the database. This is driving me crazy! What would have changed that would make the form pass the 0? It doesn't do it for some of other combo box fields, just 3 of them. There must be a parameter i'm missing.

eharvilicz is offline   Reply With Quote
Old 03-14-2019, 12:16 PM   #4
Cubsm22p
Newly Registered User
 
Join Date: Feb 2018
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Cubsm22p is on a distinguished road
Re: Form is passing a '0" to Report when combo box is left blank on form

do the three fields that are doing this all have the same field type
Cubsm22p is offline   Reply With Quote
Old 03-14-2019, 12:28 PM   #5
eharvilicz
Newly Registered User
 
Join Date: Mar 2019
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
eharvilicz is on a distinguished road
Re: Form is passing a '0" to Report when combo box is left blank on form

It's actually the same field in 3 different spots on the report, so i'm sorry...not really 3 different fields. One of the fields in the table that is getting queried is an Auto number data type. Not sure if that has anything to do with it.
eharvilicz is offline   Reply With Quote
Old 03-14-2019, 03:20 PM   #6
Mark_
Longboard on the internet
 
Join Date: Sep 2017
Location: Not the middle of no where, but I can see the road to it from my house.
Posts: 1,615
Thanks: 16
Thanked 301 Times in 298 Posts
Mark_ will become famous soon enough
Re: Form is passing a '0" to Report when combo box is left blank on form

So to be clear, your report is showing a number that does not have a value as "0" instead of leaving it blank, correct?

Would you ever want to show a "0" on the report?
Mark_ is offline   Reply With Quote
Old 03-15-2019, 05:11 AM   #7
eharvilicz
Newly Registered User
 
Join Date: Mar 2019
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
eharvilicz is on a distinguished road
Re: Form is passing a '0" to Report when combo box is left blank on form

No. My report is showing a 0 when i want it to be blank. The form has a drop-down combo box and when you leave it set to "blank", it passes a '0' to the report for some reason. Does that make sense? I would never want a '0' in the report since the fields are for name initials.

eharvilicz is offline   Reply With Quote
Old 03-15-2019, 05:33 AM   #8
jdraw
Super Moderator
 
jdraw's Avatar
 
Join Date: Jan 2006
Location: Ottawa, Ontario, Canada;West Palm Beach, Florida
Posts: 11,757
Thanks: 66
Thanked 1,934 Times in 1,883 Posts
jdraw is just really nice jdraw is just really nice jdraw is just really nice jdraw is just really nice jdraw is just really nice
Re: Form is passing a '0" to Report when combo box is left blank on form

Perhaps you could post a copy of the database in zip format and include instructions to show how to produce the issue.
Good luck.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jdraw is offline   Reply With Quote
Old 03-15-2019, 07:17 AM   #9
JHB
Have been here a while
 
Join Date: Jun 2012
Location: In the south of Denmark (Jutland), near the German border.
Posts: 7,590
Thanks: 2
Thanked 2,036 Times in 1,992 Posts
JHB has a spectacular aura about JHB has a spectacular aura about
Re: Form is passing a '0" to Report when combo box is left blank on form

Quote:
Originally Posted by eharvilicz View Post
The form has a drop-down combo box and when you leave it set to "blank", it passes a '0' to the report for some reason..
Are you using a Multi-Valued Field type?
__________________
If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up."
JHB is offline   Reply With Quote
Old 03-15-2019, 11:14 AM   #10
eharvilicz
Newly Registered User
 
Join Date: Mar 2019
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
eharvilicz is on a distinguished road
Re: Form is passing a '0" to Report when combo box is left blank on form

1) Thanks for all of the repsonses, i really appreciate it! 2) I got it. For some reason, a few tables had the initial fields set to Number. I changed them all to short text and all is well.

eharvilicz is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing Criteria from form to query with wild cards and "Or" LisaLu Queries 2 04-14-2016 08:22 AM
Form viewed in "Form View" is blank! help! tungkee831 Forms 20 08-13-2013 06:10 AM
"Activate" when Passing Focus from a Form grinnZ Forms 4 08-09-2011 01:43 PM
"Where" statement - Report criteria based on combo boxes in a form Renoir Reports 3 08-02-2007 02:42 AM
Combo can not be left blank RussG Forms 2 05-12-2005 11:04 AM




All times are GMT -8. The time now is 06:22 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World