Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
| Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 13th, 2010, 11:09 AM
Authorized User
Points: 188, Level: 3
Points: 188, Level: 3 Points: 188, Level: 3 Points: 188, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2010
Posts: 45
Thanks: 12
Thanked 0 Times in 0 Posts
Default Accees report-how to display month as character

Hi everyone, I need your help here.

I have a query show month as 1, 2, 3..... and I use it do my report.
But on my report, I want to show month as January, February, March.......
How do I do?

Thanks,
C
 
Old September 13th, 2010, 02:07 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Show your query.

But, basically, you should be able to use
Code:
   ..., MONTHNAME( theMonthYouAreCurrentlyGetting ) AS theMonth, ...
If you show your actual query, probably would be easier to help you.
The Following User Says Thank You to Old Pedant For This Useful Post:
cindyl (September 14th, 2010)
 
Old September 14th, 2010, 04:11 PM
Authorized User
Points: 188, Level: 3
Points: 188, Level: 3 Points: 188, Level: 3 Points: 188, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2010
Posts: 45
Thanks: 12
Thanked 0 Times in 0 Posts
Default

could you provide more detail. I am using a query which has month shows as a number. but on the report, it should show September, October..

many thanks,
Cindy
 
Old September 14th, 2010, 05:52 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

As I said, twice, show your existing query. Without that, it's hard to say more than I already have.
 
Old October 2nd, 2010, 08:01 PM
Authorized User
Points: 188, Level: 3
Points: 188, Level: 3 Points: 188, Level: 3 Points: 188, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2010
Posts: 45
Thanks: 12
Thanked 0 Times in 0 Posts
Question how to conver data type from text to number on the Access code

Hi everyone, I need your help!

On my Access table Projects0, my field name IndexCode, data type is text. I try to use combo box and List box. combo box for IndexCode0, and List box for ProJe. I need to bound these two fields. When I select item from IndexCode0, the related item should show up on List box Proje, but I got "data type mismatch in criteria expression". Here is my code:

****

Private Sub IndexCode0_AfterUpdate()
Me.ProJe.RowSource = "select ProjectName from Projects0 where IndexCode=" & Me.IndexCode0

End Sub

**

If I swithch IndexCode data type from text to number, it works, but I can not. Because in this field, many data start with 0, like 00723, so I have to use data type text for IndexCode on table.

Thanks,

Cindy
 
Old October 4th, 2010, 02:08 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Code:
Me.ProJe.RowSource = _
    "select ProjectName from Projects0 where IndexCode= '" & Me.IndexCode0 & "'"
You have to put '...' around *string* values. Never around numbers. Always around strings.
The Following User Says Thank You to Old Pedant For This Useful Post:
cindyl (October 4th, 2010)




Similar Threads
Thread Thread Starter Forum Replies Last Post
Month and Year to Date on a Report Mitch Access 2 February 20th, 2007 10:23 AM
query Current Month, Month+1, Month+2, Month+3 anterior Access 2 September 24th, 2006 08:25 PM
Calendar Display Month rodmcleay ASP.NET 1.0 and 1.1 Professional 1 August 9th, 2004 11:40 PM
Asp day of month display karib Classic ASP Databases 10 April 5th, 2004 12:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.