Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access Forms Coding > Can't find fiel...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 41488 of 43412
Post > Topic >>

Can't find field on subform - bookmarks

by =?Utf-8?B?S2VubnkgRw==?= <KennyG@[EMAIL PROTECTED] > Aug 4, 2008 at 09:41 AM

I get the message DatabaseName Can't find the field 'DirectorCoordinator' 
entered in your expression.  Run Time Error 2465

I am using bookmarks to obtain data from a table for this letter. 

Below is my code and if you can take a look at it and please tell me what
is 
incorrect.

Thanks,


Sub PrintTracerSurveyRe****t(sfrmRe****ts)
    Dim objWord As Word.Application
    Dim objDoc As Word.Do***ent
    Dim objBookmarks As Bookmark
      
    'Launch Word and load the JCAHOTracerPreSurveyRe****t template
    Set objWord = New Word.Application
    objWord.Visible = True
    Set objDoc = objWord.Do***ents.Add("S:\Quality & Process 
Improvement\QPI\JCAHO PreSurvey Tool\Do***ents\JCAHOPreSurveyRe****t3.dot")
    'Add information using predefined bookmarks
    
   With objDoc.Bookmarks
            .Item("DirectorCoordinator").Range.Text = 
[sfrmRe****ts].Form!DirectorCoordinator
            .Item("SurveyID").Range.Text = [sfrmRe****ts].Form!SurveyID
            .Item("SurveyDate").Range.Text = [sfrmRe****ts].Form!SurveyDate
            .Item("SubSiteName").Range.Text =
[sfrmRe****ts].Form!SubSiteName
            .Item("Standard").Range.Text = [sfrmRe****ts].Form!Standard
            .Item("Observation").Range.Text =
[sfrmRe****ts].Form!Observation
            .Item("Recommendation").Range.Text = 
[sfrmRe****ts].Form!Recommendation
            .Item("FollowupComments").Range.Text = 
[sfrmRe****ts].Form!FollowupComments
   End With
    
    objWord.PrintOut
    objDoc.Close wdDoNotSaveChanges
    objWord.Quit
    
   End Sub

-- 
Kenny G
 




 3 Posts in Topic:
Can't find field on subform - bookmarks
=?Utf-8?B?S2VubnkgRw==?=   2008-08-04 09:41:01 
Re: Can't find field on subform - bookmarks
"Graham Mandeno"  2008-08-08 09:46:20 
Re: Can't find field on subform - bookmarks
=?Utf-8?B?S2VubnkgRw==?=   2008-08-08 09:43:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 20:13:15 CST 2008.