Results 1 to 8 of 8

Thread: How do I?

  1. #1
    Join Date
    Sep 2001
    Posts
    175

    Post Unanswered: How do I?

    In a master detail form, a user enters values in 4 fields on the master form. How do I make the values entered in the 4 fields appear in a combo box on the detail form so that the user can select 1 out of the 4.

    Help Please!!!!!!

  2. #2
    Join Date
    Feb 2002
    Posts
    403
    Is the master form tied to a different table to the detail form?

  3. #3
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    I'd have to know more about the set up, but would it work to have all five controls use the same lookup table for their rowsource? This way, anything available in a control is available to all.

    If not, you may have to do it in the code. Seems complex. The big Question is...

    Is this all on the same form?

    If so, at some point (on exit of Control4?), exit code that will get the values of the four controls. Then concatanate these together to make a rowsource for the combobox.

    me.cboDetailChoice.RowSourceType = "Value List"me.cboDetailChoice.rowsource = me.txt1 & ";" me.txt2 & ";" me.txt3 & ";" me.txt4

    Are the 4 controls on a different form?
    Create a table of one field (tlkpTable). The data in this table will continually be replaced by the latest four choices (assuming one user in the database at a time).
    On exit of control1 call function to write the value of control1 to the first record
    On exit of control2 call function to write the value of control1 to the second record
    etc.
    Then the combobox will have as its rowsource the table, tlkpTable.

    Feel free to follow up
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

  4. #4
    Join Date
    Sep 2001
    Posts
    175
    To answer Guru's question, the master form and the subform are from different tables but a one to many relationship exist between the two tables via another field

  5. #5
    Join Date
    Feb 2002
    Posts
    403
    If that is the case then you could consider requerying the combo box records after updating the four fields in the main form. I assume the combo box recordsource is set to the main table.

  6. #6
    Join Date
    Sep 2001
    Posts
    175
    How do I go about requerying the combo box. I am somewhat inexperienced in this.

  7. #7
    Join Date
    Feb 2002
    Posts
    403
    Assuming the four records on the main form are updated then the form is closed.

    In the on open event of the form containing the combo - box write

    Me.combobox.requery

    HTH

  8. #8
    Join Date
    Sep 2001
    Posts
    175
    Thanks DynamicTiger - I will give it a try

Posting Permissions

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