Results 1 to 13 of 13
  1. #1
    siddel77 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    8

    Load textbox from another textbox

    Hi, im having this problem in a db in access.

    I have a form with a subform in it. In this subform i have controls from 2 related tables, one with personal information of people ('people'), and the other relates the first table with a 3rd table('postulacion').


    When I enter a person id in the id_postulacion textbox it automatically loads the id in the id_people textbox if that person id already exists in 'people' table (it also loads the rest of that person's info).
    What I want to achieve is that even if that id does not exist in 'people' table, it will load the content of id_postulacion in id_people.

    Thanks in advance

    Santiago

    PS: Sorry if my english is not perfect, because im not a native english speaker.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    I am not understanding description of the issue. Are you really working with comboboxes? Can you attach file, or at least an extract of the relevent objects, for analysis? Copy and remove confidential data, run Compact & Repair, zip if still large.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    siddel77 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    8
    Thanks for your fast reply.
    Im working with textboxes, not with comboboxes. To put it simple, I want to load a textbox with the value typed in another textbox.
    For example, I write "123" in textbox A and when i go out of textbox A, I need to load automatically "123" in textbox B
    I've tried to do that programatically in the various events of textbox A but I coudnt make it work.

    I wanted to attach the file, but im at work and cant zip anything

    Thanks again for your help

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Why do this?

    What have you tried and why doesn't it work - error message, nothing happens, wrong results?

    Is box B bound or unbound?

    If unbound simply =boxA in its ControlSource.

    If bound then in AfterUpdate event of box A:
    Me.boxB = Me.boxA
    or
    Me!bound field name = Me.boxA
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    siddel77 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    8
    Thanks again for your reply, i've tried what you say and it didnt worked for me.
    I have a question, I know that I have to change boxA and boxB for the names of my controls, but I have to change de 'Me'?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Why didn't it work - what happened - error message, wrong results, nothing?

    I would have to analyze your project. If the project is under 500kb, no need to zip. Extract the relevant objects to another file, don't need data, run Compact & Repair. Why can't you zip? Windows Explorer has compression utility.

    Still not understanding why you need to do this.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    siddel77 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    8
    Nothing happens.
    Now I could make the file less than 500kb so i will attach it.

    The db has 2 forms, one is a subform of the other. The issue is in the subform.
    When you type into the first 'Cedula' (is the legal identification number) textfield, if that 'Cedula' exists in the table 'Concursantes' (these are people), it loads all data of that person.

    What i want to do is that when someone types into the first 'Cedula' field a number that does not exist in table 'concursantes' it is loaded automatically in the second 'Cedula' field which is bounded to the 'Cedula' field in 'Concursantes' table. That way im sure that is the same number in both places.

    Hope this explanation helps you understand my problem

    Thanks again for your help!

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Could you explain the tables? I translated their names but didn't help me understand what this data is. The Relationship setup doesn't seem right. For instance, I think the jointype between Llamados and Perfiles should be 'Show all records from Perfiles...'
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    siddel77 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    8
    Im not sure if i can explain this in correct english, but i'll try

    Im working at Human resources, this db is for managing how we get new people in the organization and how people that is currently working with us arrive to new postions.

    In the table 'Llamados' im storing administrative information. A 'Llamado' is a request for people interested in a vacant position at the organization.
    In one 'Llamado' we can have multiple 'Perfiles', for example, we do a 'Llamado' because we need professionals and we have various 'Perfiles' (Profiles) for example Economists, Architects, Lawyers, etc.

    Then in the table 'Concursantes' im going to store data of people that is going to be evaluated. But i only store personal data here (Name, surname, Personal ID ('cedula'), telephone number, etc.)

    When someone postulates for some position ('Perfil') I store the 'Cedula' (personal ID) of the person that is already in the 'Concursantes' table and the id of the profile in 'Perfiles' table. In this way I relate a person with the profile he is postulating to. Also in 'Postulaciones' table I store data of the evaluation process of that person for that profile.

    I hope this explanation is clear enough for you to understand

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Yes, that helped me understand the tables.

    Perfiles = job descriptions (profiles)

    Llamado = vacant position announcement (recruitment)

    Concursantes = job applicants (candidates)

    Postulaciones = relates candidates with profiles and documents evaluation

    Now need clarification for what you want the form to do. Is this to add a new evaluation record? Do you want to create new candidate record at the same time? A properly structured form/subform will automatically record the Cedula key values into the related tables. Or do you just want to display the personal data already in the Concursantes table?

    Why are the controls on main form disabled?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    siddel77 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    8
    In the form, i want to create a new 'Postulacion' but if the candidate does not exist i want to create it in the same step.
    If the candidate is alreadyin the db, when i enter the 'cedula', personal data from 'concursantes' table is loaded automatically.
    If the candidate isnt in the db, i want to copy the 'cedula' from one field to the other, to prevent errors.

    The fields that are disabled is because i dont want to modify that data from that form.

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    You CANNOT enter data for both postulacion and concursantes tables in the same form. It is because the candidates can relate to many profiles and therefore each candidate will have multiple postulacion records. Having the postulacion entry as the primary and concursantes as subform also won't work. If the candidate is not in the concursantes table, should either enter the data before starting the postulacion record or open 'popup' form for the concursantes record entry then return to the postulacion form. That's what the combo/list box OnNotInList event is intended for.

    It is possible to have concursantes table on the main form and postulacion as a subform.

    The same applies to postulacion and perfiles tables.
    Last edited by June7; 08-30-2011 at 05:18 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #13
    siddel77 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    8
    I'll think more about this, and try to find a solution.

    In the meantime i'll let this in this way, because basics are working fine.

    Thank you very much for your time and help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Count/Sum value in a textbox
    By brandonze in forum Forms
    Replies: 2
    Last Post: 08-05-2011, 11:19 AM
  2. Textbox Can't Contain Null Value
    By AUS1960 in forum Forms
    Replies: 1
    Last Post: 05-10-2011, 01:48 AM
  3. Textbox and numbers
    By GraemeG in forum Forms
    Replies: 1
    Last Post: 03-16-2011, 06:05 AM
  4. Replies: 1
    Last Post: 11-26-2009, 01:09 PM
  5. change() on the textbox
    By skywalker in forum Forms
    Replies: 0
    Last Post: 03-01-2009, 01:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums