Results 1 to 12 of 12
  1. #1
    Join Date
    Dec 2004
    Posts
    277

    Unanswered: create new line in a text box

    Ok what I am trying to do is put text into a textbox based off of the checkbox controls

    for example

    Me.ResDelv = -1 'The Caption is Residential Delivery
    Me.Guaranteed = -1 'The Caption is Guaranteed Delivery

    I want to put in the text box

    Explanation of Additional Charges:
    Residential Delivery
    Guaranteed Delivery

    in that format so I just pretty much need to know a line break or somethin..

  2. #2
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    So the check boxes can be one or the other but not both?
    If so, I hope you're using an option group to prevent the user from checking
    both. If you use an option group, then your text field's control source
    could be something like:
    =Choose(optCheck,"Res Delivery", "Gar Delivery")
    Inspiration Through Fermentation

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Try vbCrLf ...
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Dec 2004
    Posts
    277
    it is not an option because it can be multiples

    so I am trying to see if it is checked and if it's checked put the caption in the text box

    but I want to format the text box so that it will appear on the invoice the way it should

  5. #5
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by DackJaniels
    it is not an option because it can be multiples

    so I am trying to see if it is checked and if it's checked put the caption in the text box

    but I want to format the text box so that it will appear on the invoice the way it should
    There is no format or mask for that ... What do you mean it's not an option??? Multiples??? Of what? Multiple selections? Just concat to the end of the caption text ...
    Back to Access ... ADO is not the way to go for speed ...

  6. #6
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    So you want to populate a text control on a report based on a few Yes/No fields (or "checkboxes") in your recordsource?
    Inspiration Through Fermentation

  7. #7
    Join Date
    Dec 2004
    Posts
    277
    thats correct...

    On the Entry Form there are check boxes... so based on the record I want to be able to explain what the additional charges are

  8. #8
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Sorry to keep asking questions, but...

    Are you using the form to generate the criteria for the report, and then passing a SQL statement as a recordsource for the report when the user presses a "Print" button?
    Inspiration Through Fermentation

  9. #9
    Join Date
    Dec 2004
    Posts
    277
    What I was planning to do was when it prints have it place the text I have designated in the text box & The Caption <NEWLINE>
    THENEXTCAPTION <NEWLINE>
    NEXTCAPTION<NEWLINE>....

  10. #10
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    I understand what you're trying to do. I'm trying to understand how you get there?

    If the report is based directly on a table that contains the checkboxes, you have to do it one way. If you are using a query or a sql statement in the recordsource, you can do it another way.
    Inspiration Through Fermentation

  11. #11
    Join Date
    Dec 2004
    Posts
    277
    the form is based on the table and is on the recordset when performing the action

  12. #12
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    I'm going to take a stab here:

    Code:
    strCharges = ""
    If Me.ResDelv = -1 
    strcharges = strCharges & "Residential Delivery"
    End If
    if Me.Guaranteed = -1 
    strcharges = vbcrlf & "Guaranteed Delivery" 
    End If
    Me.txtBox = strCharges
    However, this only displays on the form. It is not saved for later use when you print the invoice. You'd have to add the same code to your invoice report
    Inspiration Through Fermentation

Posting Permissions

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