Combobox not working properly when moved to a tabcontrol page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jiwei06xie
    New Member
    • Sep 2006
    • 17

    Combobox not working properly when moved to a tabcontrol page

    Hi,
    I have a main form with 3 subforms and some combo boxes. It is working fine as an independent form. However, when I draged into a tabcontrol page, two off the combo boxes stopped working properly. The filtering criteria I used stopped functioning. Here are some details about my problem:

    (1) the following 1 main form and 3 off subforms are all in one-to-many relationships.

    Main form: mfrmCustomer
    Subform1: sfrmSite
    Subform2: sfrmMeter
    Subform3: sfrmMeterReadin g

    (2) three combo boxes:

    Combo box1: tarketmeteidcontrol source: =[Form]!sfrmMeterReadi ng.Form!Meter_I D
    Combo box2: txtStartReading DateTime Row source: SELECT StartReadingDat eTime, Reading, Meter_ID
    FROM tblMeterReading
    WHERE (((tblMeterRead ing.Meter_ID)=[forms]![mfrmCustomer].[tarketmeterID]));
    Combo box3: txtEndReadingDa teTime Row source: SELECT EndReadingDateT ime, Reading, Meter_ID
    FROM tblMeterReading
    WHERE (((tblMeterRead ing.Meter_ID)=[forms]![mfrmCustomer].[tarketmeterID]));

    No problem with combo box 1, I can see field [tarketmeterid] is responding but the second and third combo box always ask for a value for "[forms]![mfrmCustomer].[tarketmeterID]". Anything I need to change when moving combo box /main/subform into a tabcontrol?

    Many thanks for your help in advance!
  • Jiwei06xie
    New Member
    • Sep 2006
    • 17

    #2
    Hi I have sorted out the problem. Where am I wrong is that I need to add the main form (i.e. the form holding the tabcontrol pages) into the filter condition when moving into a tabcontrol, like: forms!tabcotrol form!mfrmcustom er!tarketmeterI D.

    Cheers.

    Comment

    Working...