Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 30th, 2005, 05:53 AM
Csteed Csteed is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 9 Csteed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 35 m 13 sec
Reputation Power: 0
Formatting text within Report in VB

I have the following code in a module that links 3 fields in an unbound control in a report. The code also eliminates white space between the fields. I want the output of A1$ to format as Yes/No. The current output is 0 or -1.
Is it also possible to format A3$ "Date" as bold and DateDet as normal text.

Function Resolv$(DelResol, Detls, DateDet)

Dim A1$, A2$, A3$, CR$

CR$ = Chr(13) & Chr(10)


A1$ = IIf(ISB(DelResol), "", DelResol & CR$)
A2$ = IIf(ISB(Detls), "", Detls& CR$)
A3$ = IIf(ISB(DateDet), "", "Date :" & DateDet & CR$)

Resolv = A1$ & A2$ & A3$

End Function

Reply With Quote
  #2  
Old June 30th, 2005, 09:30 AM
sherrington sherrington is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 85 sherrington User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 4 m 52 sec
Reputation Power: 5
A1$ = IIf(ISB(DelResol), "", iif(DelResol, "Yes", "No")) & CR$)

I don't think Access will support partial field bold - if you find out otherwise please let me know!

Reply With Quote
  #3  
Old June 30th, 2005, 09:36 AM
Csteed Csteed is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 9 Csteed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 35 m 13 sec
Reputation Power: 0
Quote:
Originally Posted by sherrington
A1$ = IIf(ISB(DelResol), "", iif(DelResol, "Yes", "No")) & CR$)

I don't think Access will support partial field bold - if you find out otherwise please let me know!



This worked. Thanks for your help.
A1$ = IIf(ISB(DelResol), "", IIf(DelResol, "Yes", "No") & CR$)

Reply With Quote
  #4  
Old June 30th, 2005, 11:57 AM
Csteed Csteed is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 9 Csteed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 35 m 13 sec
Reputation Power: 0
Thanks for your help today. I have another problem relating to the code I emailed this morning. I am using a form to filter data in a report. I am now having a runtime error 3021 - I am filtering data and there may or may not be records. I want to disable this error, can you let me know where I put the error code to trap the error so that it does not appear when I am looking at null data.

This is where the error occurs, and it repeats all the way through the code I sent this morning.

Function ISB(V) As Integer
If IsNull(V) Or V = "" Then ISB = True Else ISB = False
End Function

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Formatting text within Report in VB


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 3 hosted by Hostway
Stay green...Green IT