Results 1 to 7 of 7
  1. #1
    Nathan4477 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    4

    Linking Combo boxes and Text boxes

    Hi All,



    I currently have 3 tables within a database with student details of three different classes. I need to create a user form that has a dropdown box which I can select a student from one of these tables with a number of text boxes below which brings up all the students details, then once the student has been selected and the correct details are shown then I need to create a button which allows me to move that student from one table to another. Is this at all possible? and if so I would be very grateful if someone could help me with this. (appreciate that this is quite a lot of questions in one go so even if you have the answer to one part of the question I would be very grateful).

    Many thanks!

    Nathan

  2. #2
    Nathan4477 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    4
    Forgot to mention, I'm using MS Access 2010

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Have you tried using the wizard to get what you need? One thing I do not like about the wizard is it creates macros. This may be OK for your needs but I find macros difficult to work with in the long term. I am a little fuzzy about what it is you are trying to accomplish. For instance, moving data from one table to another is not a "Best Practices" thing.

    I would suggest investing the time to learn about the combobox control. Also, you should understand relational databases and how to work with an RDBMS before attempting to build forms. Here is a tutorial series that goes over the combo. It covers the important properties, bound and unbound combos, displaying multiple columns in unbound textboxes, and cascading dependent combos.
    https://www.accessforums.net/tutoria...ers-52741.html

  4. #4
    Nathan4477 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    4
    Thanks ItsMe! Will have a look at that thread and brush up on my skills. so the overall goal is to allow users to move students from one stage to another on the database once they have completed a stage in the class. e.g. the three tables are "Not Started", "in progress" and "completed" so once a student has moved from not started to in progress, a user can go to the userform, select the student from a combo box and move them to in progress at the click of a button.

    Kind regards,

    Nathan

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    To do this you will likely need a few tables. Some tables will not change much at all. For instance, a table that defines who the students are would not need to be edited after each student is added to the table as a record. Each record within the tblStudents would represent a single student. A primary key field would need to be defined. It is ideal to use the Autonumber data type for your Primary Key fields. Other fields would be attributes for a student. For instance, a FirstName field and a LastName field would be attributes, as well as DateOfBirth. Choose the correct data types for your fields and avoid using spaces, special characters, or words reserved by Access.

    Other tables will help to manage events and these tables will receive edits and or records appended. For instance, when a student accomplishes a goal you would add a record to tblExams. tblExams could have attributes like, ExamName, ExamDate, ExamLocation, etc. In addition to these attributes you will also want to include Foreign Key fields. FK's are used to help follow Rules of Normalization. For instance, you will not want to include the Students' FirstName and LastName and DateOfBirth in the tblExams when all you need to do is include the Primary Key value from the relative record within tblStudents in the Foreign Key field of tblExams, eg StudentID.

    Tables that manage events will have a PK field and several FK fields. Tables that define entities like Students, Teachers, Buildings, Vendors, etc. will likely have a PK field and no FK fields. Although, it is OK to include FK fields in tables similar to tblStudents. For instance, GenderID, TitleID, AddressID.

  6. #6
    Nathan4477 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    4
    Thanks ItsMe! Will have a play around with all that and if I have any problems will be back.

    Kind regards,

    Nathan

  7. #7
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    EDIT: I posted in the wrong thread, never mind ...

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

Similar Threads

  1. Replies: 11
    Last Post: 08-06-2014, 09:47 AM
  2. Replies: 9
    Last Post: 06-04-2014, 10:45 AM
  3. Form combo box with text boxes
    By N3w2access in forum Forms
    Replies: 4
    Last Post: 01-17-2014, 04:44 AM
  4. Subform linking 2 combo boxes does not work
    By bishop0071 in forum Forms
    Replies: 9
    Last Post: 04-15-2013, 10:40 AM
  5. Replies: 2
    Last Post: 03-30-2010, 05:08 PM

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