Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2010
    Location
    in the dark...
    Posts
    87

    Unanswered: Filling the REST of a text box

    Hey everyone. Hopefully this will be another easy solution. I have a form, in which a user types in a string in the text box "DescriptionOfWork". Directly after that, they fill out another text box called "NewDefect". Then they go on to fill out some more information. I also have a "Preview" text box, that will hopefully populate showing their post, which will include the julain date, their DescriptionOfWork left-justified, followed by enough "-"s to reach the following NewDefect, which is right-justified.

    example:

    User puts the following in DescriptionOfWork:
    Code:
    Ordered motherboard on this date.
    and the following in the NewDefect:
    Code:
    b56
    I want the post to look like this:
    Code:
    (JulianDate) Ordered motherboard on this
    date.----------------------------(b56)
    I don't know how big the preview box is going to be yet, so I don't know how large of a space I need to fill with hyphens. The entire entry (everything in the preview box along with the technician's first and middle initials and last name) will be exported to a work-order in Excel. So I have to tinker with the maximum size of the preview box to make the maximum size equal to that of the space where this will be exported to in the work-order. Does this make sense?

    Thanks for any help provided.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    I would do the formatting in the work order excel book given the option.

    How much control do you have over the Excel bit?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Mar 2010
    Location
    in the dark...
    Posts
    87
    well, I'm not going to be programming any of the Excel bit. My coworker is pretty good with Excel, though I don't know if he's good enough to do that. I can ask, but I was trying to see if there was a simple solution with VBA in Access. That way, I could export just a couple of controls on my form and make his job easier.

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    He can use text formatting in Excel the same way you would use them on Access reports. The difference is whether or not you're destroying the underlying data...

    If he's pretty good with excel, this isn't much trickier than formatting dates or numbers.
    Last edited by Teddy; 04-01-10 at 11:30.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Mar 2010
    Location
    in the dark...
    Posts
    87
    alright. Using hyphens for a text mask, and then making JulianDate and the DescriptionOfWork left-justified, and the DefectCode right-justified? that sounds simple enough. Thanks

  6. #6
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    There's also the option of controlling Excel from Access, and formatting the worksheet after you've output the required data to it.

    It's a bugger to set up, but can be great fun watching it go!
    10% of magic is knowing something that no-one else does. The rest is misdirection.

Posting Permissions

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