Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Posts
    12

    Question Unanswered: Populate txt with cmb info

    I am having some trouble with my database.

    Basically, most of the data on the forms is pulled from the Table_Progress table. When a department is selected from the first form that is displayed when opened (i.e Delivery Services), the form frmProgress is displayed. On this form are three drop down boxes each attached to a table. This is where I get stuck!!

    When a person is selected in drop down list 1 I would like txtTrainingPlan1 (next to the View Progress button) to populate with the persons Training Plan which is on the Table_Progress table…. Hope this makes sense!?!

    Can anyone help?

    Reagrds
    Pitz
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    i took a look at your db, but my way of doing things is 180° out of phase with your way of doing things so i'm not sure i can offer constructive suggestions.

    anyway - maybe you can get there with this:

    right now it looks like you are feeding your combos from temporary tables containing only one field - a name.

    add the field that you want in your text-box to the query that builds your temporary tables so that it becomes a field in your temporary table. no doubt this will involve joins and stuff, but the query design grid will get you there eventually.

    feed your combo with both fields from the temporary table. you will need to change:
    .columncount =2
    .coulumnwidths = 5cm; 0cm
    .boundcolumn = 1 '(1 in design view/properties, 0 if you are doing this from code)

    now your combo "knows" the value you are trying to stick in the textbox when you select a name from the combo. so...

    private sub combo_afterupdate()
    me!myTextbox = me!mycombo.column(1)

    et voila... the desired value that you had hidden away in the second column of the combo appears in the textbox.

    ??

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    PS - why use the temporary tables?

    combos feed quite happily directly on queries and save you the hassle of managing/updating the temps.

    izy
    currently using SS 2008R2

Posting Permissions

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