Tommy
03-13-2006, 03:18 PM
Hi everyone,:hi:
Having a bit of a brain cramp today (not unusual). I was setting up a dot to use as a simple invoice. In the dot I placed 2 form fields, in the document_new event I placed some code. I want this code to fire only when the doc is started for the first time. (back to the code) I fill them like
ActiveDocument.Formfield("Text1").Result = Format(Now,"mmm dd, yyyy")
ActiveDocument.Formfield("Text3").Result = InputBox ("Enter invoice number").
All is well and good so far, that is untill I try to use it. :bug: I get the input box, I fill in the information just like I want it and wala no joy! For something so quick and easy I figured no brainer right. I wasted an hour and a half fighting with it and said well I can fake it by putting the code in the open event and checking if the formfield has a value. So instead I ask a question, cause I am just not getting something here and I don't like it :rofl:
Oh the code above is as best as I can remember it, I am sure I used ThisDocument and ActiveDocument, it wouldn't fill it in otherwise LOL maybe.
Having a bit of a brain cramp today (not unusual). I was setting up a dot to use as a simple invoice. In the dot I placed 2 form fields, in the document_new event I placed some code. I want this code to fire only when the doc is started for the first time. (back to the code) I fill them like
ActiveDocument.Formfield("Text1").Result = Format(Now,"mmm dd, yyyy")
ActiveDocument.Formfield("Text3").Result = InputBox ("Enter invoice number").
All is well and good so far, that is untill I try to use it. :bug: I get the input box, I fill in the information just like I want it and wala no joy! For something so quick and easy I figured no brainer right. I wasted an hour and a half fighting with it and said well I can fake it by putting the code in the open event and checking if the formfield has a value. So instead I ask a question, cause I am just not getting something here and I don't like it :rofl:
Oh the code above is as best as I can remember it, I am sure I used ThisDocument and ActiveDocument, it wouldn't fill it in otherwise LOL maybe.