Results 1 to 3 of 3

Thread: Combobox Value

  1. #1
    Join Date
    Aug 2003
    Posts
    160

    Unanswered: Combobox Value

    Hi! I have a form Called "Customer Order" and on which there is a subform called "Order". On the "Order" subform I have a combobox to select values.

    This combobox selection must reflect on One Form called "Order Details Subform1".

    This "Order Details Subform1" Has one subform, called "Order Details"

    "Order Details" has one subform called "frmDetailChecklist". This "frmDetailChecklist" has to change based on the combobox selection to another form which I designed called "frmNetworkChecklist"

    The Problem here is "frmDetailChecklist" is linked to the "Order Details" Subform by Child and master fields. As I told u I designed one form called "frmNetworkChecklist", but I didn't link this one to "Order Details" Subform.

    I have two values in my combobox.Based on these two values these two forms has two change correspondingly.

    Here is the code I wrote:

    Private Sub Form_Load() ' this code goes in Order Details Subform1
    Select Case Forms![Customer Order]![Order].Work_Type
    Case 1 'This represents the column which is bound to combobox
    ChecklistTitles.SourceObject = "frmDetailChecklist"
    Case 2
    ChecklistTitles.SourceObject = "frmNetworkChecklist"
    End Select

    End Sub

    ChecklistTitles is the subformcontrol for frmDetailChecklist.

    With this code I am getting errors like "Object does not support this method or Object"

    Any Help!
    Vad

  2. #2
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    The problem is with one of these 2 lines:

    ChecklistTitles.SourceObject = "frmDetailChecklist"
    ChecklistTitles.SourceObject = "frmNetworkChecklist"

    the ChecklistTitles object does not support the .SourceObject method or object. create a new line and type checklistTitles then the period and a list of available method or objects should pop up.

    Is ChecklistTitles your combobox? If so, you may need to specify either RowSource or ControlSource rather than SourceObject.

  3. #3
    Join Date
    Aug 2003
    Posts
    160
    The ChecklistTitles is what I got, if u click on subform control/other/name. I am not good at VBA. Some one in the forum told me to put that thing.

    Actually it is not combox rowsource.

    Any help thanks.


    Originally posted by jmrSudbury
    The problem is with one of these 2 lines:

    ChecklistTitles.SourceObject = "frmDetailChecklist"
    ChecklistTitles.SourceObject = "frmNetworkChecklist"

    the ChecklistTitles object does not support the .SourceObject method or object. create a new line and type checklistTitles then the period and a list of available method or objects should pop up.

    Is ChecklistTitles your combobox? If so, you may need to specify either RowSource or ControlSource rather than SourceObject.
    Vad

Posting Permissions

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