Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2001
    Posts
    3

    Question Unanswered: auto duplicated field within record

    Guys - hope you can help a complete duffer here:

    Access 2000/XP. All I'm trying to do is create a record definition containing a field that creates itself as an exact duplicate of one that is entered previously in the SAME record (as the record is saved - no need to display it). A simple calc or constant field, or macro, I would have thought ... but how's it done in Access?

    Ta for any pointers!

    JW

  2. #2
    Join Date
    Nov 2001
    Posts
    4
    A little more info please. Is this a table, where you want a copy field to be populated every time you change the value in another field? Or is the information coming from an Access form and you simply want to populate the field in the table?

  3. #3
    Join Date
    Dec 2001
    Posts
    3
    It's for a web form feeding an Access back end. The user enters a description of, for example, a 'category' field of his choosing and submits this. This description is part of a table of descriptions that goes on to populate a drop-down/combo menu for other users to search all records by.

    The SQL component of subsequent searches from this combo menu however needs to take its actual value from a separate value field which in the case of all non-control records ('All', etc) is exactly the same as that entered originally. Hence the needs for for the duplicated field.

    At the moment the new categories are entered twice, once for the decription field and then copied exactly and pasted into the second (value) field.

    You can see the purpose of the end result at this work-in-progress site

    http://www.kentcollege.com/content/coe/index.html

    Thanks for your help!

    JW

  4. #4
    Join Date
    Nov 2001
    Posts
    4
    If you're using SQL to populate the table based on the user's input, can't you just populate the actual field and the duplicate field at the same time:

    INSERT INTO Category_Table (Key, Category, Category_Duplicate)
    VALUES (1,'Category Value', 'Category Value);

    In this case the SQL would handle the duplication, and you would be assured that every time a user entered that category, the other duplicate would be populated as well.

  5. #5
    Join Date
    Dec 2001
    Posts
    3
    Thanks - of course this is the 'proper' way to do it from the input side of things (web form) - and I'd lost sight of this !!!!

    But I had assumed creating the extra field info wouldn't be a problem on the database side of things as the record was saved!

    (In at least one database proggy of my long distant past experience - Superbase - it was easily possible to create any manner of fields -virtual or real - created on the fly from an existing field in the SAME record. Calc or constant fields I think.)

    Is there a way to SQL-it database side?

    Thanks....

Posting Permissions

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