Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2010
    Posts
    9

    Unanswered: Appending data to a field

    Hi all,

    This is my first post. I am using access 2003.



    The problem:-
    I have a bound field called 'sample'

    I would like to concatenate data to the sample field from a number of different fields. for example:-

    add 'A' to sample field (this will be a combo box A to Z)
    add 'Date' to sample field
    add 'where it was tested' to sample field (combo box of test sites)

    so sample field will look like this

    A 23/11/2010 Newcastle

    I would like an add button after each data field as sometimes I do not have all the information at once. So, it might just be 'A 23/11/2010' without the test location.


    thank you for looking at my post

    wotwot

  2. #2
    Join Date
    Aug 2009
    Location
    Up Nort' Wi
    Posts
    140
    Use the ampersand to concatenate strings. Like Field1 &Field2, altho I usually put a manual space there: Field1 &' ' &Field2.

    Why use a combo for a simple a-z choice? Seems a bit of overkill. I'd, personally, use a text box and validate the input: If len(Field1) = 1 And Field1 Like "[A-Z]" then DoSomethingCool

    Sam, hth
    Good, fast, cheap...Pick 2.

  3. #3
    Join Date
    Nov 2010
    Posts
    84
    If I understand I have attached an example
    Attached Files Attached Files

  4. #4
    Join Date
    Nov 2010
    Posts
    9
    Hi Sam,

    Textbox instead of a combo seems a good idea.

    How do I use the concatenate code to append data in a field in a different table?

    I would like each field to have an add button. Do I use a query to append the data? or write it in sql code??? sql seems the way but waaaay to complicated for the likes of me.

    regards
    wotwot

  5. #5
    Join Date
    Nov 2010
    Posts
    9
    Apologies eremija, I didn't see your reply. I will take a look at the attached file. very kind of you

  6. #6
    Join Date
    Nov 2010
    Posts
    9
    hi, i am having difficulties opening the zip file. (not valid) could you try and zip it again please? kind regards

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    or another design approach is to store the results of each individual test and present them in date/time order or whatever is the desired order

    doing what you proposing could be a symptom of a suspect design. Im not saying it is, just that it could be.

    what happens if say for instance you know the final text is called 'Z' and it inidctaes a test suite is completed, searching for test Z becomes a nightmare
    want to make certain you can only ever record a single test H.. how do you enforce that in the appended model.
    what happens if some bright spark wants to introduce new types of test.
    I'd rather be riding on the Tiger 800 or the Norton

  8. #8
    Join Date
    Nov 2010
    Posts
    84
    Might seem complicated but it is so. Do you have an example of the latter issue in the appendix.
    Attached Files Attached Files

  9. #9
    Join Date
    Nov 2010
    Posts
    9
    hi, it must be me. It will not allow me to open the zip file.

    healdem, thank you for your reply. Hopefully it is not a bad design...time will tell. The concatenated field appears on our test report. We produce 1 - 2 test reports per month. Majority are Test A followed by date and where it was tested. The client and field data are in different tables with a relationship between them.
    thank you for looking
    Beth

  10. #10
    Join Date
    Nov 2010
    Posts
    84
    Second attempt
    Attached Files Attached Files
    Last edited by eremija; 11-23-10 at 13:27.

Posting Permissions

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