Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005
    Posts
    3

    Question Unanswered: Access 2003 : Referencing fields: Text box

    Hi
    Normally one would code in Access 2000 the following in the control source : =[fieldx] of a textbox

    I would like to know how would one code the control source of a textbox referencing a field in a report rtp_report1 in Access 2003.
    Should it be =reports("rtp_report1").fieldx

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    for reports I'm not sure, but I suspect the syntax will be the same, or similar to forms
    eg
    forms!myformname!mycontrolname
    or
    forms!myformname!myvariablename
    or
    forms!myformname.myeventname

  3. #3
    Join Date
    Jan 2005
    Posts
    3

    Lightbulb

    Found my solution. Thanks to Ken Snell
    http://www.dbforums.com/showpost.php...16&postcount=4

    No need to enter anything in the control source. You only need to use the textbox name in the source code of the report.

    Solution
    Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)

    Me.textbox1.Value = field1
    Me.textbox2.Value = field2
    Me.textbox3.Value = field3
    Me.textbox4.Value = field4
    Me.textbox5.Value = field5
    Me.textbox6.Value = field6

    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •