Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    copying a value (Access 2000)

    I use the example below to capture the value of a textbox. What I would like to do is take the result toval and store it in a table called employees in my db. The table field is called fullname. What I want the user to do is to be able to add the possible new name they type in to the employees table. I was going to use this as a button on a form. Is there a way to do this? Thanks...

    Dim toval As String

    toval = Me!To.Value

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: copying a value (Access 2000)

    I think we need to understand your scenario more fully. Are your users doing a search for a name, and if they don't find it, then you want to give them the option of adding a new name to the employees table? If that's the case, you probably don't want to work with full name as a single field. Name searches are complicated enough with all the different spellings and what not, that you usually want to search by last name and then by first name. I would also strongly suggest you not store full name as a field, but rather create it from the First, Last, Middle, Suffix (or whatever fields you end up with) using string concatenation when you need the full name. If I've missed the mark, please post back.
    Wendell

  3. #3
    2 Star Lounger
    Join Date
    Apr 2003
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: copying a value (Access 2000)

    I believe that you only have 3 steps to complete:

    1. Set the Record Source in the Form properties to the "Employees" table.
    2. Set the Data Entry property in the Form to "Yes".
    3. Set your Control Source in the text box properties as "Fullname".

    Try that and see if it does what you need it to do.
    Kindra

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: copying a value (Access 2000)

    Your right on Wendell. I do store the names in seperate fields. I may have confused the issue. Fullname is the concatenated field.

Posting Permissions

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