PC Review


Reply
Thread Tools Rate Thread

date from form

 
 
=?Utf-8?B?Y2hyaXNfc193YWx0ZXJz?=
Guest
Posts: n/a
 
      17th Mar 2006
1st let me tell you what I have done, and then what I am having problems
with. I have a form with a field called IRD. IRD is a date format of mmmm
dd","yyyy and it shows in the form okay, but now I need to put it in a word
doc. When I add the bookmard it comes up with mm/dd/yy. I have a script to
import it, and this is where I think my promble is. here is the script.
If IsNull(Forms![in-house r&d]![IRD]) Or Forms![in-house r&d]![IRD] = "" Then
prompt = MsgBox("The Issue Date has not been entered", vbOKOnly)
Else
.activedocument.Bookmarks("IRD").Select
.selection.Text = (CStr(Forms![in-house r&d]![IRD]))
.activedocument.Bookmarks.Add Name:=("IRD")
End If
see it is taking it as ".selection.text" , but I tried ".selection.date" but
again I have come up with errors. can someone please help in this matter. I
have spent to long on this and I am running out of hair to pull....LOL..
thanks.
 
Reply With Quote
 
 
 
 
Wolfgang Kais
Guest
Posts: n/a
 
      26th Mar 2006
Hello "chris" (?).

"chris_s_walters" wrote:
> 1st let me tell you what I have done, and then what I am having
> problems with. I have a form with a field called IRD. IRD is a date
> format of mmmm dd", "yyyy and it shows in the form okay, but now
> I need to put it in a word doc. When I add the bookmark it comes
> up with mm/dd/yy. I have a script to
> import it, and this is where I think my promble is. Here is the script.
> If IsNull(Forms![in-house r&d]![IRD]) Or Forms![in-house r&d]![IRD] _
> = "" Then
> prompt = MsgBox("The Issue Date has not been entered", vbOKOnly)
> Else
> .activedocument.Bookmarks("IRD").Select
> .selection.Text = (CStr(Forms![in-house r&d]![IRD]))
> .activedocument.Bookmarks.Add Name:=("IRD")
> End If
> see it is taking it as ".selection.text", but I tried ".selection.date"
> but again I have come up with errors. can someone please help in
> this matter. I have spent to long on this and I am running out of hair
> to pull....LOL.. thanks.


Try this:
..selection.Text = _
FOrmat$(CStr(Forms![in-house r&d]![IRD])),"mmmm dd"","" yyyy")

--
Regards,
Wolfgang


 
Reply With Quote
Reply

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Field of Date Type Not Keeping Month Portion Of Date Ronald R. Dodge, Jr. Microsoft Word Document Management 1 20th Oct 2008 12:46 PM
DATE IN TEXT FORM - NEED TO CHANGE IT DATE FORM SSJ Microsoft Excel Discussion 3 27th Oct 2006 09:34 PM
DATE IN TEXT FORM - NEED TO CHANGE IT DATE FORM SSJ Microsoft Excel New Users 3 27th Oct 2006 09:34 PM
Open form code to enter a date in short date format =?Utf-8?B?VGFuZHk=?= Microsoft Access Form Coding 5 5th Jul 2005 08:05 PM
Opening a form to Schedule Date that equals today or closest date =?Utf-8?B?U2N1YmFNRA==?= Microsoft Access Getting Started 1 28th Mar 2005 05:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:41 PM.