Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2004
    Posts
    364

    Unanswered: HELP! How to copy textbox text into the same blank textbox after new record chosen?

    I have a textbox on a form called Address_1. When a new blank record is selected on the form I want the contents of address_1 textbox to be copied into the now blank textbox so I dont have to keep on re-typing it in everytime i click for a new record.

    It is for a job database, so when people move positions, their job description changes, but their address stays the same.

    The form is called Details, and is linked to the table Details.

    Any takers?

    TOM

  2. #2
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404

    Question Text boxes

    Er - I'm not sure about this, are you entering thesame data into the underlying table?

    If you are, you're basically navigating through a recordset and ctrl ' will grab the contents of the last entry and put it intot he current field (you must click into the text box first).

    Are you really re-enterng the address intot he database everytime you create a new record?

    Last edited by Ryker; 09-01-04 at 09:44. Reason: Smiley

  3. #3
    Join Date
    Aug 2004
    Posts
    364
    Yes im re-entering the addresses. I know its not good practice, but its what has been asked for at the moment. Any way of automating it? Otherwise I will just link a new Address table to the Job details table.

  4. #4
    Join Date
    Apr 2004
    Posts
    173
    The other thing you could do is use the forms tag property to hold the contents of the text box and then spit out the tag property into the new record's text box. You'd have to use a couple of different events. Just a thought.

  5. #5
    Join Date
    Aug 2004
    Posts
    364
    Any ideas of some event code to do it? Im hopeless with coding!


  6. #6
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    I initially was going to say just make the default value to that address. but not every person lives at 123 Main St for example...How much information are you inputting that's the same? Name, date of birth, home phone, etc? Or just the address. You could maybe set up a combo box displaying their name, and after you selected a name from there the appropiate name, # etc is automatically filled then you just have to input or change the address...
    Ryan
    My Blog

  7. #7
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404

    Nope - I'm missing this

    In the text box with the adddress, say line1.

    Click the mouse. the cursor appears.
    It flashes a bit.
    Hold the Control key down (Ctrl)
    Press the key marked '
    Release the control key.

    The last address entered apprears.

    If you want the address that matches a particular name it's more difficult, and we'd need information on how you're storing the name (fullname, forename and surname etc,) and if there are any other unique identifiers.

  8. #8
    Join Date
    Aug 2004
    Posts
    364
    The information which is just the same is the address. The job description is the only thing which changes.

    The tables are -

    JOB_DESCRIPTION table -

    Job_ID
    Job_title
    Employee_name

    Address table -

    Address_line_1
    Address_line_2 etc etc

    So when Job_ID and Job_title change, the old job_ID and tile are still stored and the employees home address stays the same but is added to the employees new Job_ID and Job_Title.

  9. #9
    Join Date
    Apr 2004
    Posts
    173
    in the current event of the form

    if me.newrecord then
    textAddress = me.tag
    else

Posting Permissions

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