Automatic Data Entry Script OnChange Event for Date Field.

Hi,
Sub: Automatic Data Entry Script OnChange Event for Date 
Field.
has anyone assigned 'Today date'( new Date()) to a custom 
date filed on the form - OnChange of a Picklist field, I 
have the following code.
DatefiledName.value = new Date();
This assigns, currect date to the field, but then when I 
save it does not like it. When I manually assign a date 
it displays in the format mm/dd/yyyy, and saves 
correctly, so I changed the script to:
d= new Date();
s = d.(getMonth() +1);
s += '/' + d.getDate();
s += '/' + d.getFullYear();
DatefiledName.value = s;
This also accepts and displays the date as 'mm/dd/yyyy' 
but when I save , it again does not like the format. 
What Am I doing wrong?
Has any1 assigned date to DateType field in Onchange 
Event;
Thanks for your Help.
Q
0
Q
7/12/2004 10:27:07 PM
crm 35858 articles. 1 followers. Follow

1 Replies
1201 Views

Similar Articles

[PageSpeed] 25

I have not done this, but have you tried adding a time element to it?  the
data fields in the schema are all of a date/time type.

Hope this helps

Andy

"Q" <anonymous@discussions.microsoft.com> wrote in message
news:2ae8701c4685f$5dc83440$a601280a@phx.gbl...
> Hi,
> Sub: Automatic Data Entry Script OnChange Event for Date
> Field.
> has anyone assigned 'Today date'( new Date()) to a custom
> date filed on the form - OnChange of a Picklist field, I
> have the following code.
> DatefiledName.value = new Date();
> This assigns, currect date to the field, but then when I
> save it does not like it. When I manually assign a date
> it displays in the format mm/dd/yyyy, and saves
> correctly, so I changed the script to:
> d= new Date();
> s = d.(getMonth() +1);
> s += '/' + d.getDate();
> s += '/' + d.getFullYear();
> DatefiledName.value = s;
> This also accepts and displays the date as 'mm/dd/yyyy'
> but when I save , it again does not like the format.
> What Am I doing wrong?
> Has any1 assigned date to DateType field in Onchange
> Event;
> Thanks for your Help.
> Q


0
Andy
7/13/2004 3:43:27 PM
Reply:

Similar Artilces:

Data Series Labels in Area Chart
Hello- I'm trying to create a combination chart; one data series in an area chart, and three in line format. Got the chart created, but the data series labels for the area chart show up in the middle of the area, which looks awkward. Is there anyway to move them closer to the top edge of the area plot? I don't seem to find any options for moving the labels in an area chart. Hi, The data labels for the area series have no options for alignment. Add another line series to the chart based on the area data. This has the options to align data labels. You can format the line seri...

Print Footer with Last Print Date field name
How do you create a Footer to print the Last Printed Date and Last Revised Date? Its not as obvious in Excel as it is in Word. Hi this is only possible with VBA inserting this information within an event procedure -- Regards Frank Kabel Frankfurt, Germany Ted wrote: > How do you create a Footer to print the Last Printed Date and Last > Revised Date? Its not as obvious in Excel as it is in Word. ...

Retrieving Data from a Column / Row to populate a cell
I currently have data supplied to me in an Excel spreadsheet that I to transfer manually I would like this to populate a cell reference, the problem I have is that I cannot gather a train of thought to obtain the data from from a specific row/column. There is a sample of the data supplied to me below Name In Out Int Greg 165 108 29 09 July 2003 42 34 9 14 July 2003 44 19 4 16 July 2003 40 40 8 17 July 2003 39 15 8 Andrew 125 43 9 1...

Twitter script (no API)
Hi, I am looking for a script or how to develop one to update the Twitter status (tweet) without using the API. Thanks. Regards, Matteo | I am looking for a script or how to develop one to update the Twitter | status (tweet) without using the API. | I have no idea what you're talking about. It sounds like you want javascript for use in a webpage. You probably won't find it in Microsoft newsgroups. Look for a Twitter forum. ...

The data in my form is changing after the status is closed
I have a form which is based on a query for invoicing. I have some client who have been invoiced for their service and not their status is closed. If this person returns as a client and I set the new contract year and I go to the invoicing form to invoice for their new serivce the prior year contract year information for the service which has already been closed is no longer there. I want to keep this data as read only, but still be able to add new information. ...

How do I add a data series in a combination chart in PPT 2003?
I have a combination bar/line chart showing gross revenues and passengers by month over a 3-year period. The gross revenues are bars on the primary y-axis and passengers are lines on the secondary y-axis. I am trying to add gross revenues and passengers for CY2010. I am able to add a data series for the passengers, but when I try to add a data series for the gross revenues, the chart treats it as a series on the secondary axis as a line. How do I add the series as a bar on the primary axis, or alternatively, change the series from a line on the secondary axis to a bar on th...

Filter for Same Value in Two Fields
There are two fields in my query. "From" and "To". For sake of ease, let's say both these fields are US Cities. How can I pull all the records that show shipped "From" Denver and that show shipped "To" Denver? Thank you in advance. You stated: shipped "From" Denver and that show shipped "To" Denver Technically this would mean both values were Denver which might not make much sense if you expected the From and To to be different. Assuming you are viewing your query in design view, you would type "Denver" und...

how I can sum or subtract 2 or 3 field in access in any record
hi I want know that why there is NOT any relationship between access and excel and how I can sum and subtract 2 or 3 filds in access in any record thanks hadi_khodaparast@yahoo.com Hello Hadi - I'm not sure I understand exactly what you are asking, but Excel is *not* a 'front end' for an Access database. You can use Excel to query the db & copy Access data into a workbook in several ways. That copy of the data can be used for calculations, but the data *doesn't* get changed in the Access file. Although the modified results can be imported to Access it may very well be t...

Timer event on forms
I have an Access 2002 db and while building a rather complicated report I would like the users to see a progress bar or timer that lets the user know that the system is working. I built a ‘lazy mans’ progress bar using objects and making them visible at various points in the process. There are about 10 steps which utilize DoCmd.RunSQL. If I try and add a timer event to show a progress bar the SQL running takes over the CPU and the event does not run or refresh. Any suggestions? Thanks for your time. Mark I solved my own problem. The timer event was in a loop and did not give focus to ...

automatic capital letters
For Office 2007: Whenever I type a period, the next letter is always capitalized. How do I disable this feature? Thanks. WORD 2007 Office Button (top left hand corner). Word Options (lower right hand corner). Proofing (on the left hand side), then, on the right hand side, towards the top click on AutoCorrect Options . . . AutoCorrect: English (Your Area) window should launch. AutoCorrect tab / Capitalize first letter of sentences - turn this off (remove tick / check from field). OK. OK. If my comments have helped please hit Yes. Thanks. &qu...

difference two date
Anyone pl help me. How calculate difference between two date in the year,month & date. I want to difference year, month & date ( all are calculate). Ex. a1 = {01/12/1950} b1={01/11/1960} result we want b1-a1 = 9 year 1 month 10 days. (These format) Pl Help me. =DATEDIF(A1,B1,"Y")&" years "&DATEDIF(A1,B1,"Ym")&" months "&DATEDIF(A1,B1,"Md")&" days" Regards, KL "RKS" <RKS@discussions.microsoft.com> wrote in message news:B419EA21-0AA8-4F1F-AB90-0BBE52C68B54@microsoft.com... > A...

Exchange 5.5 Store.exe Event ID 4097
The following Dr Watson error has occurred 3 times over the last 3 weeks - I cannot determine any pattern or trend: The application, store.exe, generated an application error The error occurred on 04/30/2004 @ 13:26:29.025 The exception generated was c0000005 at address 0042466B (<nosymbols>) ========================================================== Any assistance will be appreciated. I have the "Recovey Tab" set to restart on all failures, and it has been restarting OK... ======================================================== Here is the entire entry from the drWts...

How do I stop from automatically scrolling to the right?
This just started outa the blue. New and existing worksheets scroll all the way to the furthest point to the right. Any pop up windows I type in the letters disappear to the left. sounds like you have a key stuck on your keyboard. "Tom" wrote: > This just started outa the blue. > New and existing worksheets scroll all the way to the furthest point to > the right. > Any pop up windows I type in the letters disappear to the left. I tried that line of thought, and have checked the keys and wireless mouse to see if that needed a reboot....very oddddd. I had it hap...

MS Office 12 Event ID: 5000
I am consistently seeing this error pertaining to MS Office 2007 on two Windows 2003 terminal servers. The error is as follows: Event Type: Error Event Source: Microsoft Office 12 Event Category: None Event ID: 5000 Date: 12/15/2009 Time: 4:35:52 PM User: N/A EventType office12asserttimer, P1 p1ml, P2 12.0.6425.0, P3 1, P4 0, P5 NIL, P6 NIL, P7 NIL, P8 NIL, P9 NIL, P10 NIL. I have Googled this problem, but can't find a workable solution. Any help would be greatly appreciated. Very strange, we've started to have the same issue, since yesterday 15 decemb...

Event 1202 0x10d9
Iam getting this message in my event logs every 5 minutes: Security policies were propagated with warning. 0x10d9 : Unable to read from or write to the database. Advanced help for this problem is available on http://support.microsoft.com. Query for "troubleshooting 1202 events". For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. I can find plenty of info on 1202 events but none specific to 0x10d9. Any help would be greatly apprecited ...

Terrible performance in "Bank Deposit Entry" window
When I select a range of cash reciepts within the "Bank Deposit Entry" I have to wait up to 2 minutes before the list is returned. Sometimes it returns only one record after that long of wait! Also when scrolling through the transactions in this window is excruciatingly slow... I know we have about 12,000 cash reciepts that need to be deposited but I dont think that amount of records should cause such a slow down. Is there any possible way to improve the performance (Maybe with additonal indexes)? Or is there a know issue with this? Or am I doing something wrong here??? :) T...

Automatic Cell Re-sizing
I have created a spreadsheet that is to be completed by several people. Some of the cells in the spreadsheet are protected appart rom the ones to be completed by the users. On those cells 'Wrap Text' is enabled, is it possible to make those cells re-size automatically when they type to much text to fit in the viewable area ? Any help would be much appreciated.... Thanks Tappie If you're saying that you have unlocked cells with Wrap Text set then, as long as they are not merged cells and you haven't manually adjusted the cell's row height, their row heights sh...

How can I find duplicate entries in an entire worksheet?
I have pulled in information from a database and I am trying to remove duplicate records without having to look manually. Is there a way to do this? Take a look at http://cpearson.com/excel/duplicat.htm In article <BB25CF5A-3389-4C83-A0D6-05A6711BFF99@microsoft.com>, jbrown <jbrown@discussions.microsoft.com> wrote: > I have pulled in information from a database and I am trying to remove > duplicate records without having to look manually. Is there a way to do this? ASAP Utilities has a feature that does this nicely........... Free at www.asap-utilities.com Vay...

Weird characters and missing Calculated Fields
Could you please advice me how to fix the 2 problems in GP10 Report Writer. I have 2 modified reports -- one of them the Calculated Fields are missing, and the other modified report where the Calculated fields' name have weird characters. Please find the below links show the 2 screenshots of the 2 problem issues. http://img34.imageshack.us/img34/4149/20091005missingcalculat.png http://img34.imageshack.us/img34/6564/20091002specialcharacte.png Did this happen as part of an update? If you export the report(s) to a package file and then open it up in Notepad, are the fields still missing...

repeat data as seperate tables
Hi, Does anyone have a solution for a problem i'm strugling with? I would like to repeat some data from a collection of objects. Using a DataList while generate 1 table as a result. However, I would the output to be a seperate table for each repeated item. Can this be done? Thanx John On Nov 26, 1:27=A0pm, "John Devlon" <johndev...@hotmail.com> wrote: > Hi, > > Does anyone have a solution for a problem i'm strugling with? > > I would like to repeat some data from a collection of objects. > Using a DataList while genera...

pivot table issue -- putting data of the same code on diff lines
i have an issue with excel that is very hurtfu i'll put together a table with say the first column having a range of dates or perhaps keyword second column would have product codes (often repeating product codes referring to a different column one date or keyword third column would have numbers as in number of cases sol then i'll make a pivot tabl and items that have different column a values but like column b values appear on different row THIS DRIVES ME INSANE PLEASE HELP ME ...

Cannot automatically resolve users in Outlook
Hi everyone, this is a weird one and thats why I post it twice. I currently moved 60 users from the Users folder to a OU in order to apply a GPO to them. Out of the 60 , when I try to resolve the username in the email client for 5 of them (by Ctrl +K or check names) I fail to resolve. Who can tell me what is not replicating or not viewing correctly as I need to find a solution pretty quickly. Many thanks, Johnny pls manual replica your all DC GC and try again -- Jammyù�ٴ� "Johnny Noitargim" <jm@nospamplease.com> ���g��l��s�D :417d48d7$0$43598$ed2e19e4@ptn-nntp-re...

Query/Report based on Employee Hire Date
This is probably a very basic thing that I just don't know how to do. I need to pull a report on people hired in December, regardless of year, for performance appraisals. The hire date that I currently have in the database is in the mm/dd/yyyy format. How do I sort on just the Month portion of this. I can then build my reports off of the query. Thank you in advance for any help or suggestions. Steve Add a calculated field to the query. Field: Month([Hire Date]) Criteria: 12 That gets everyone ever hired in the month of December. John Spencer Access MVP 2002-2005,...

merge multilple data values
how would I merge multilple data values: in seperate columns as: js-1234 to .jpg Thanks Hi Jennifer, ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ Hi Jennifer, Try using =(A1&B1) where A1 and B1 are the cells where your data sits ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ X-No-Archive: yes "Jennifer Burnel" <jenny@...

Problem in saving data in the customized case entity
Hi all, We have a Customized Case Entity in CRM 3.0 about a Patient ,with each case having detailed information like history,insurance,case contacts,Schedules etc On Visit Schedules, we have attributes like order shipped date and fax order received etc. when I enter the shipped date and save it the modified by field has the System account instead of the user who is modifying. We have to reassign the system user to the User who is actually modifying it manually.This happens for all the users in CRM. Can anyone guess where the problem could be? Thanks Karthik Generally, the SYSTEM us...