Results 1 to 12 of 12
  1. #1
    archie is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    26

    Combo box


    good day,

    im new to access and i need some help if possible. the problem is, i want to create a combo box that picks a 1 information and automatically fills up the rest of box with the information about that user.

    for example: i have form with the list of information of "student" ( Name, address, course and yr) and now when i go to the next form of "characteristic" ( Hair color, style, hieght, weight, looks) it must automatically fills up the information of the "student" in the "characteristic" form when i select the name of the student in the combo box. So that i wont have to input again the data of the student in that form ( "Characteristic form")

    ( i hope my question is clear. and sorry for my english, im still learning )

  2. #2
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    What you need to do is when you create the rowsource for the combo box is to base it on a query, and in that query include the characteristics of the person. In the porperties of the combo box set all the column widths to 0 with the exception of the name.

    On the after update of the combobox event you can do the following

    Me.Age= Me.Combobox.Column(n)
    Me.HairColour = Me.Combobox.Column(n)

    Where n is the ordinal column number in the combo box.

    David

  3. #3
    archie is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    26
    Quote Originally Posted by dcrake View Post

    In the porperties of the combo box set all the column widths to 0 with the exception of the name.

    David
    thank you for your reply sir.

    in the column widths, when i try to set it in 0 my combo box shows nothing.

    Quote Originally Posted by dcrake View Post

    On the after update of the combobox event you can do the following

    Me.Age= Me.Combobox.Column(n)
    Me.HairColour = Me.Combobox.Column(n)

    Where n is the ordinal column number in the combo box.

    David
    sir, is this code to update all records in the text box when i select 1 info in the combo box? when i try this the info's in the text box of hair color, style and looks gets replaced by whats on the combo box.

    (sorry im not that familiar with the codes :P)

  4. #4
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    Take a look at the example provided

  5. #5
    archie is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    26
    thank you very much for your help, u really save me .

    one last question, since when i click the combo box i can update those text that you mention. now, how can i update the rest of the information below when i click the combo box (their were in different table)?

    here's the thing that gives me a lot of headache :P

    http://www.mediafire.com/?0chfzjlfum3

    i hope i can finish this by monday or else im fired. lol

  6. #6
    archie is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    26
    will i use the DlookUp function or add it on recordsource?

  7. #7
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    Did not follow the link as it seems a bit spurious. Can you explain your problem here.

  8. #8
    archie is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    26
    i did the example that you give me and it works, thnx . now i have only one problem left, how can i update those data in below?

    i have a student form and the course form, in the course form i created a combo box that when i select one student it will show his information. but the only problem is the course that he take didn't update when i select a different student in the combo box.

    thank you in advance and good day


    here's my example.

  9. #9
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    That is because your controls are unbound. If they are unbound you have to tell Access to update the fields in the tables. Access does not know what fields to update.

    David

  10. #10
    archie is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    26
    thank you for the reply sir, i know that im asking way too many questions, and i hope you dont mind becuz im kind of new to access .

    one last thing, how can i unbound them and what i must do to update them?

    thank you very much

  11. #11
    archie is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    26
    ok sir, i finally get what i want. thank you for your help and time, you really save me. thanks again. i hope you dont mind and ask you again some giving headache questions in the other treads lol

    good day

    archie

  12. #12
    archie is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    26
    ok sir, i finally get what i want. thank you for your help and time, you really save me. thanks again. i hope you dont mind and ask you again some giving headache questions in the other treads lol

    good day

    archie

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

Similar Threads

  1. Replies: 3
    Last Post: 02-26-2009, 10:17 AM
  2. Replies: 0
    Last Post: 08-17-2008, 12:19 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