Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2012
    Posts
    4

    Unanswered: Table/Query determining output text

    Hello everyone,

    I'm working on a side project for my company, I'm looking to output text in a more user friendly way. The actual output text is very complicated, so I would like to be able to modify it at-will without having to modify the VBA code and need to distribute a new copy of the database. It would be easier to modify a linked table record and output the new text in real time. Currently I have some VBA code set up like this:

    txtTicketText.Value = "Project Information: " & tempvars!tmpProjectNumber & " - " & tempvars!tmpProjectDescription

    But what I want to do is set up a table to call a certain output depending on a value determined by a query, or a lookup, or some method of finding a specific cell of a specific record in a table/query. I've looked around and the best/only method I've found is to use a Dlookup, but that just enters the entire string as text instead of inputting the tempvars and displaying the value:

    "Project Information: " & tempvars!tmpProjectNumber & " - " & tempvars!tmpProjectDescription

    instead of:

    Project Information: 7889123 - Development of return process documentation.

    I've been getting by with macros and some basic VBA knowledge from college a few years ago, but I'm getting stuck on this particular problem. Any help would be appreciated. I've included a copy of a test database I've been playing with trying to find a way to output the text.
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Output text in a user friendly way
    That's a role for the user interface....
    Suggest you write a function. Which returns what ever you need
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Aug 2012
    Posts
    4
    It's the output formula is what I'm trying to make more user friendly. I have the user interface done, the system is currently being used by about 120 people. I have to change the output formula quite frequently and I'm trying to make it more "user friendly" to the people that have to change the formula, not the actual output UI. Right now I need to redistribute a new copy of the database each revision when I change the VBA code, as opposed to many of the other changes that can be made at-will by modifying the output variables in a table, like the one attached. The tables are stored on a central server and are not locked by the users in the front end. The issue I run into is it will not input the variables, it simply prints the formula as text.

  4. #4
    Join Date
    Mar 2009
    Posts
    5,441
    Provided Answers: 14
    Have a look at the Eval() function in Access help.
    Have a nice day!

  5. #5
    Join Date
    Aug 2012
    Posts
    4
    That did it. Thanks!

  6. #6
    Join Date
    Mar 2009
    Posts
    5,441
    Provided Answers: 14
    You're welcome!
    Have a nice day!

Posting Permissions

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