Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old November 11th, 2003, 03:20 AM
Snowsride Snowsride is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 79 Snowsride User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 27 m 53 sec
Reputation Power: 5
Control displays null as zero (0)

I have a control populated by a procedure that can produce a null value. Under this circumstance I want the control to be blank but it displays a zero.

How can I force the control to display nothing if the value is null?

Mike Collard

Reply With Quote
  #2  
Old November 11th, 2003, 12:00 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 12
What kind of a control?

S-

Reply With Quote
  #3  
Old November 11th, 2003, 12:01 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 12
I also ment to ask what type of object are you displaying it in and how is it formated, and what is the data type of the null value.
S-

Reply With Quote
  #4  
Old November 11th, 2003, 12:23 PM
Snowsride Snowsride is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 79 Snowsride User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 27 m 53 sec
Reputation Power: 5
Null displayed as zero

Now it gets complicated.

The control is a combobox that gets populated with the current value from a procedure that returns the value held in a table. The field is unformatted text. The user can change the value in the combobox and another procedure, triggered from the On_Click event of a Confirm button, saves the new value back to the table.

The form that holds the combobox is not bound to the table that is ultimately going to be updated because it is necessary to store an effective and inactive date against each record and a standard data entry form does not cope with this.

Hope this makes sense.

Mike

Reply With Quote
  #5  
Old November 11th, 2003, 09:17 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 12
Could you post a sample DB with the problem and I will look at it?

S-

Reply With Quote
  #6  
Old November 12th, 2003, 04:21 AM
Snowsride Snowsride is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 79 Snowsride User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 27 m 53 sec
Reputation Power: 5
Control shows null

Have had a couple of other suggestions in another forum - one that the controls property format may be set to display 0 for null - but it isn't. The other suggesting I use Nz(value,"") to send a zero length string to the control when it is populated - but that doesn't work either.

I have a partial solution thus: -

The control is a combo with two columns bound to column 1
and I want the value of column 1 displayed when a
selection is made. If the column width of column 1 is set
to greater than zero then 0 is displayed if no selection
has been made but if the column width of column 1 is set
to zero then null is displayed with no selection. This is
a partial solution but it means that when a selection is
made the value of column 2 is displayed and I want to display the value of column 1!

Hope you can follow this.

Mike Collard

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > Control displays null as zero (0)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway