Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Angry Unanswered: assigning values to a report

    I am trying to assign a value to a text field in a report, but Access won't let me.
    Why?
    Is there a way that i can assign values to a report?

    actionant

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: assigning values to a report

    Originally posted by actionant
    I am trying to assign a value to a text field in a report, but Access won't let me.
    Why?
    Is there a way that i can assign values to a report?

    actionant
    Nope! Textboxes have to be bound to a column in a table ... You could use a label and set it's caption ... Remember tho that if you do so you'll have to perform the needed formatting ( Currency, Date, etc ...)

  3. #3
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Smile Re: assigning values to a report

    Originally posted by M Owen
    Nope! Textboxes have to be bound to a column in a table ... You could use a label and set it's caption ... Remember tho that if you do so you'll have to perform the needed formatting ( Currency, Date, etc ...)
    thanks thats great
    but now i need to format it.
    I want it displayed as a Long Date as apposed to 1/30/04.
    Can this be done?
    If not Long Date, what other format can I use?

    regards
    Actionant

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: assigning values to a report

    Originally posted by actionant
    thanks thats great
    but now i need to format it.
    I want it displayed as a Long Date as apposed to 1/30/04.
    Can this be done?
    If not Long Date, what other format can I use?

    regards
    Actionant
    The Long Date is a specified format ... Something to remember again: You'll need to size the label appropraitely for the data to which it will contain. Also there is a hard 2048 character limit for the label caption.

  5. #5
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Re: assigning values to a report

    Originally posted by M Owen
    The Long Date is a specified format ... Something to remember again: You'll need to size the label appropraitely for the data to which it will contain. Also there is a hard 2048 character limit for the label caption.
    I know Long Date is normally a specified format, but when i'm working on a report, the Format option isn't there like it would be if I were working with a form.

  6. #6
    Join Date
    Jan 2004
    Location
    Islamabad, Pakistan
    Posts
    97

    Re: assigning values to a report

    Originally posted by actionant
    I am trying to assign a value to a text field in a report, but Access won't let me.
    Why?
    Is there a way that i can assign values to a report?

    actionant
    YES! You can Assign the Value to a Text box or any unbound control by using Event Procedure onPrint or onFormat for that Report.

    Given below is the sample code which I used in one of my reports on its onPrint Event Procedure for the Page Header of this Report. In this procedure I'm assigning the Purchase Order Number depending on the Purchase Order Type as Local Purchase or Overseas Purchase

    Select Case POType
    Case "L", "D"
    RPONumber = [PONumber]
    Case Else
    RPONumber = Left([PONumber], 3) & "-" & Mid([PONumber], 10, 2) & Right([PONumber], 5)
    End Select

    (* Note here RPONumber is an unbound text box on the report and [PONumber] is the actual table field)

    I hope this will help...

Posting Permissions

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