I'm trying to display the next month in a text field

Hi there,
I've gone through all the forms and can't seem to get the code straight for
displaying the next month on a text field on my form. 
I just want the entire month name and nothing else and I have been struggling
with:
DateSerial(Year(Date()), Month(Date()) + 1, 1) 

but its showing the day and year too and thats not what I need.
Thanks in advance!
GM

0
gmazza
9/4/2007 12:03:49 AM
access.formscoding 7493 articles. 0 followers. Follow

7 Replies
835 Views

Similar Articles

[PageSpeed] 17

gmazza wrote:

>Hi there,
>I've gone through all the forms and can't seem to get the code straight for
>displaying the next month on a text field on my form. 
>I just want the entire month name and nothing else and I have been struggling
>with:
>DateSerial(Year(Date()), Month(Date()) + 1, 1) 
>
>but its showing the day and year too and thats not what I need.


MonthName(Month(Date()) + 1)
-- 
Marsh
MVP [MS Access]
0
Marshall
9/4/2007 12:49:41 AM
On Tue, 04 Sep 2007 00:03:49 GMT, "gmazza" <u37142@uwe> wrote:

>Hi there,
>I've gone through all the forms and can't seem to get the code straight for
>displaying the next month on a text field on my form. 
>I just want the entire month name and nothing else and I have been struggling
>with:
>DateSerial(Year(Date()), Month(Date()) + 1, 1) 
>
>but its showing the day and year too and thats not what I need.
>Thanks in advance!
>GM

One quick & dirty way is to use this expression and set the Format property of
the textbox to 

"mmmm"

             John W. Vinson [MVP]
0
John
9/4/2007 1:36:03 AM
Thanks Steve, that does work, but when I add 1 to it, I get an error. 
I just want The current month + 1 to always show up.

SteveM wrote:
>You need to look at te Format() function.
>
>Format(YourExpression,"mmm")
>
>That will display your date expression as a full month name.
>
>Steve
>
>> Hi there,
>> I've gone through all the forms and can't seem to get the code straight for
>[quoted text clipped - 6 lines]
>> Thanks in advance!
>> GM

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200709/1

0
gmazza
9/4/2007 5:21:38 PM
Thanks Marshall, but its not a specific month I need, I need 1 added to the
current month. Is there a way I can do that with your expression?

Marshall Barton wrote:
>>Hi there,
>>I've gone through all the forms and can't seem to get the code straight for
>[quoted text clipped - 4 lines]
>>
>>but its showing the day and year too and thats not what I need.
>
>MonthName(Month(Date()) + 1)

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200709/1

0
gmazza
9/4/2007 5:23:08 PM
Good call John, that worked, and you're right, it is a little dirty way to do
it but I'll take it!
Thanks for your help everyone!!
GM

John W. Vinson wrote:
>>Hi there,
>>I've gone through all the forms and can't seem to get the code straight for
>[quoted text clipped - 6 lines]
>>Thanks in advance!
>>GM
>
>One quick & dirty way is to use this expression and set the Format property of
>the textbox to 
>
>"mmmm"
>
>             John W. Vinson [MVP]

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200709/1

0
gmazza
9/4/2007 5:28:09 PM
One of us is confused  ;-)

As far as I can tell, my expression and John's suggestion
are just two different ways of getting the same result.
-- 
Marsh
MVP [MS Access]


gmazza via AccessMonster.com wrote:

>Thanks Marshall, but its not a specific month I need, I need 1 added to the
>current month. Is there a way I can do that with your expression?
>
>Marshall Barton wrote:
>>>Hi there,
>>>I've gone through all the forms and can't seem to get the code straight for
>>[quoted text clipped - 4 lines]
>>>
>>>but its showing the day and year too and thats not what I need.
>>
>>MonthName(Month(Date()) + 1)

0
Marshall
9/4/2007 5:56:42 PM
On Tue, 04 Sep 2007 12:56:42 -0500, Marshall Barton <marshbarton@wowway.com>
wrote:

>As far as I can tell, my expression and John's suggestion
>are just two different ways of getting the same result.

and yours is cleaner... must have been something lost in transition there!

             John W. Vinson [MVP]
0
John
9/4/2007 7:48:13 PM
Reply:

Similar Artilces:

Three different fields in one record referencing to three different records in another table
Hi. I have TableA and TableB TableA has 3 fields where types of file extensions (for different purpose) are supposed to be stored. Table B has many extension type strings for these TableA three fields (.tif, .jpg, .pdf, .gif, etc). 3 combo boxes refer to Table B to get and store TableB keys in TableA appropriated fields. When I set up table retaionship, Acces 'creates' also TableB_1 and TableB_2 and show a diagram where two other similar to tabelB tables show up. So long so good. I can create records in TableA having chosen, for each different file purpose, the respective extens...

how to create a dynamic descending list of months & years
I'm trying to create a spreadsheet whereby in cell A1 I enter in any given Month and Year ("January 2005", formatted as a date), and in cells B1:J1 the previous months and years show up (December 2004; November 2004; October 2004; etc....) If I type in "April 1985", the adjacent cells would read "March 1985; February 1985; January 1985; December 1984; etc... I've thought of a couple laboriuos, crude, potentially faulty ways of doing this, but it seems like there should be an eloquent solution. Very much appreciated!!! Marika :) Can you put the followi...

How to diffrentiate Text & number from a single cell????
Hi ther guyz............i a have small problem with the execl sheets........... my problem is e.g. i have alot of cells with a number and some text in it........and they both are in one/single cell (e.g. "878 queen st" in A1)....now what i want is to remove let's say "queen st" from each cell so that there is only number left in it.....................i cannot figure out any formula........if there is any..............need help imediately -- pack_card2000 ------------------------------------------------------------------------ pack_card2000's Profile: http://www...

concatenate several of records in a field to 1 record
Hi all, what is the best way to concatenate several of data records in a field into 1 for example i have the field named animal and inside i have bird,dog and a cow how can i concatenateall of them to have 1 field called bird,dog,cow? Have a look at either http://www.mvps.org/access/modules/mdl0004.htm or http://www.mvps.org/access/modules/mdl0008.htm depending on your setup. --=20 Joan Wild Microsoft Access MVP "thread" <yaniv.dg@gmail.com> wrote in message = news:1179848700.403433.313710@a26g2000pre.googlegroups.com... > Hi all, > what is the best way to concatena...

How do I make certain fields come up based on criteria?
Ok, please keep in mind that I am a beginner...so please make any responses very elementary in nature...THANKS! I have a table that is relaing information about why a child couldn't be placed (Foster Care). I have a Field as a Text Box with Certain prescribed reasons that are a drop down box. Here is my question. How can I have another table OR field appear on the form (that I want to create for inputting data) once they select a certain Reason (there are sub-reasons that go under each reason). Ex: Reason1 has a sub list of reasons (A, B, C) that should appear BUT if Reason2 is s...

Month start placement on axes
I have a formatted chart in excel and the major tick marks and month data is showing in the actual middle of the month. How do I make the tick label and mark show at the beginning of the actual month? Presumably you have a date-scale axis, with the base unit in months. Double click the axis, change Base Unit to Days, change Major Unit to 1 Month, and change the Minimum to the first of a month. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Jo" <Jo@discussions.microsoft.com>...

Converting CRMDatetime to Text gives one hour difference
Hi All I have one custom entity with one CRM Date Time Field that accepts date and as well as Time. I use this to convert from date time to string CRMDateTime dt= new CRMDateTime(); dt=Convert.ToDateTime(new_date.Value).ToLocalTime(); But the problem I am facing is , it gives one hour difference like if the Date I saved is 3/29/2010 and time is 10:30 AM when i convert to string i get 3/29/2010 time 9:30 AM. Please help. Did you check your local settings on your client (Tools > Options > General > Timezone)? And the Timezone of the user you are using (System, an Administr...

Reg Additional fields in GP 10
Hi All, It has come to my notice, when i maximize a window like customer or vendor maintenance window. i see few additional fields at the bottom of the window which are not editable. i dont see these fields when the windows are in there original size. This i can see in many windows like address window's etc etc some having different colors in it. Is there any use of these fields or is it a coding error???? This is with respect to GP 10.0. Regards Reddy ...

Removing a character in a field
Hi, I have a table which contains an asterisk marks in some of the fields in some records. What would be the easiest way to get rid of them? Wherever there are asterisk, I need them to be Null fields. I tried with Find and replace with "" mark, but it doesnt seem to work. Am I missign something? Thanks Ramesh On Wed, 20 Jun 2007 07:46:59 +0530, "Ramesh" <ramesh2020@gmaildotcom> wrote: >Hi, > >I have a table which contains an asterisk marks in some of the fields in >some records. What would be the easiest way to get rid of them? Wherever >th...

MSCRM API failing with User defined fields.Help !
Iam programming in ASP.NET for my company's MSCRM. I use MSAPI to retrieve and update field values in MSCRM. Iam able to do it with ease by programming in VB.NET with the MSCRM object library. Eg. strUpdateXml = "<account><name>Steve Langer</name><owninguser>{19838938-705A-4AB9-BC2E-2EDD88035EE5}</owninguser> </account>" CRMAccount.Update(UserAuth, RECID, strUpdateXml) It works fine for the normal MSCRM fields LATER, I created USERDEFINED fields in MSCRM. ( with the Deployment Manager and published). The new field created can been seen in...

Visio Text (Number) Automation
Hi. I'm creating an Organization Chart for my company. I have the org charts already setup with names, shapes, etc; however, I would like to add the total number or employees in each group, which would add up to larger group, and finally all the way to the top which will have the total number for all employees. i would like to somehow automate this process like excel does wtih a formula (=techdept+accoutningdept) which would add the numbers i manually filled in the tech and accouting dept, but would add those number together for the group above that. Thanks. ...

Can you store clipboard text and pick it up by copy it again?
I have a catch 22 - impossible actions here: A/ I want to have the sheet protected so users can't ruin all cells in the sheet B/ I have to Unprotect the sheet in the sub event Worksheet_Activate to be able to do some format macros C/ I want users to allow to copy text from one sheet and paste in this one. D/ The clipboard wipes out by the Unprotect command E/ The user have nothing to paste in... Is there a solution? /Regards --------------------------------------------------------------- ------------------------- Earl Kiosterud wrote: --------------- Imbecill, CutCopyMode gets turned...

Legend and text entry
I am on Excel 2003 and need to create a simple pie chart. I am asked to put into the legend the data, individual dollar amounts and then the total in the Legend. Is that possible and if so how can I do that without effecting my chart. Thank you. Hi, If you are asking how to put the values of the datapoints into the Legend - Excel does not do this by default. But you can do it by creating a custom name for each of the data points. Suppose you have the names of the data points in A1:A5 and the values you are plotting in B1:B5. Insert a column between A:B and enter the formula =A1...

Problem in Drawing Text with different Fonts & Charset
Dear all, I'm working in a program which will draw some string with both chinese and English character in the Window. I try to use CreateFont() to create a HFONT with Fonts "Arial" and CharSet "CHINESEBIG5_CHARSET" and then select the HFONT to the current DC. However the text drawing out isn't in Font "Arial" (It seems to be "Times New Roman" instead). After that, I try to use other available fonts on my platform, but the same outpur again. No matter what font I'm using, it give the same output!!! Does anyone know Why and how to fix it? ...

can outlook be set to not display pictures
When outlook, (office 2000) is downloading messages, I have the preview pane open. As probably everyone gets, I am getting multiple messages that are spam, and mostly sex crap with naked pictures embedded in the message. So once the message is clicked on, the preview pane shows whatever is in the message, including the pictures. I wouldn't complain if they were half decent looking, but that's another story. Is there a way to not display pictures in the preview pane? I've got 2003 so not sure if it's the same in 2000 - but.. Tools>Options>Security>Change Auto...

Merging text files with excel
Hello All. How can I merge several text files with the same format into one Excel sheet in one go ? I am importing them singly but it would be much better to merge them together before opening. Many thanks for any help ! Maybe you can use some old DOS commands. Shell to a command prompt and issue an old DOS command to concatenate the Text files. Windows start button|Run (or flying windows r as a shortcut!) win98: Command WinXP/NT: CMD Go to that folder: C: (to change to that drive) cd\myfolder1\myfolder2\myfolder3 to change to that folder copy *.txt All.Files Ren All.Files All....

Item 'Last Ordered' Field updates inappropriately
The 'Last Ordered' field updates when I transfer inventory out. This is not good. If I want to know the last time I bought an item, the date of the most recent transfer does not help - especially if it was an inter-store transfer out. Ideally, separate fields for 'Last Transferred In' and Last Transferred Out' could be added as separate fields. This would reserve the 'Last Ordered' field for the last time the item was actually ordered from a supplier. Alternately, and better thant the present system, the field could simply update with purchase orders ONLY...

selected text highlighting issue
Windows XP SP3. Office 2003 fully updated. This has always bugged me so I figured I'd finally ask the question. I run 2 monitors and work on multiple things at once. If I have a Word doc open (or notepad or some other editor) and select a block of text and then move to another application, the text in the Word doc no longer appears selected. This is extremely annoying at times. Just because my Word doc is no longer the active application doesn't mean that I don't want to see what I've selected. And if it's so that I know it's not the active application, well t...

popup calendar with multiple months
I currently have popup calender in Excel to fill in cells with the date. I would like to be able to view 3 months at a time How can I change my set up to allow this. ...

Wrap text, Merge cells
I have merged 2 cells in a column, wrapped the text. There are actually 20 rows of data ( sentences) in one cell After the 18th row within that merged cell the data is no longer visible. Is there a limit to how high a cell can be ( mine is at 350, but can be made a whole lot large, not that the data is visible though) or how many "rows" wihin a merged and wrapped cell are possible? Stumped in IN. thanks for any info on this subject A row's height (with or without merged cells) cannot exceed 409. Also, a cell can display only about 1000 characters even though it can hold ov...

Selecting display in dual monitor system
I have an XP system with two monitors. I am writing an MFC application to display information during a simulated game show that a local community theatre is producing. During the show, one monitor will display the score, the other will display information pertinent to the current game. I have each of the individual display modes (score and game) working. I'm using a CWnd derived class to display full-screen windows and paint/draw the information onto the window. My problem is that I can only get the display to output to one monitor. How do I select or identify a particular monitor...

Problem importing data from text file
Hi, I have a comma delimited file that has twenty column names followed by six rows of data. I am trying to import this into Excel. When I do this, the data imports entirely into row one. It does import into difference cells but there is one row with 120 cells of data. I was expecting it two "Wrap" and start importing the data into cell A2. Can anyone help with this? How do I show the break between column headers and data? Thanks, Chuck ...

how do I cancel an outgoing message, I have tried everything,
I tried e-mailing myself a short video last night, and it's still trying to send. I have re-booted, deleted the video, tried to delete the outgoing message, did the "repair" for microsoft office and nothing works. It's still sitting in my outbox trying to send! Help! See http://www.howto-outlook.com/faq/messagestuckinoutbox.htm -- Robert Sparnaaij [MVP-Outlook] Coauthor, Configuring Microsoft Outlook 2003 http://www.howto-outlook.com/ Outlook FAQ, HowTo, Downloads, Add-Ins and more http://www.msoutlook.info/ Real World Questions, Real World Answers --...

Outlook 2003 error when trying to use WordMail
Hi, Outlook 2003 has recently started reporting the following error, when trying to use Word 2003 as the MAil Editor. I have tried all the uslal things including Uninstalling Office, clearing the main registry settings and re installing, but nothing seems to work, does anyone have any idea what is causing this and more importantly how to solve it: "Word is unavailable, not installed, or is not the same version as outlook. The outlook email word editor will be used instead. an OLE registration error occured. The program is not correctly installed run Setup program again" Gavin,...

Payee name field too small
When downloading transactions from my PNC Bank account, all check card purchases appear as, "CHECK CARD PURCHASE XXXXXXXX1583". Obviously the purchase amount appears as well however, unless I go to the banks website and pull up my statement, there is no way for me to know who the actual Payee is. Is there a way to make Money 2005 IGNORE these first 32 characters when reading the downloaded transactions? That way I would be able to set up a more efficient and accurate Payee list & Rules Manager without having to go to the web and look up each individual transaction. In ...