 |
| 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
|
|
|
|

September 13th, 2010, 11:09 AM
|
|
Authorized User
|
|
Join Date: Sep 2010
Posts: 45
Thanks: 12
Thanked 0 Times in 0 Posts
|
|
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
|
|

September 13th, 2010, 02:07 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
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:
|
|
|

September 14th, 2010, 04:11 PM
|
|
Authorized User
|
|
Join Date: Sep 2010
Posts: 45
Thanks: 12
Thanked 0 Times in 0 Posts
|
|
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
|
|

September 14th, 2010, 05:52 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
As I said, twice, show your existing query. Without that, it's hard to say more than I already have.
|
|

October 2nd, 2010, 08:01 PM
|
|
Authorized User
|
|
Join Date: Sep 2010
Posts: 45
Thanks: 12
Thanked 0 Times in 0 Posts
|
|
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
|
|

October 4th, 2010, 02:08 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
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:
|
|
|
 |