If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Linking
I have a form frmProjects. This form gets its data from table tblProjects
which has a primary key ProjNo. On the form is an unbound combobox called cboProject which is used to select a project on the form. On the form there is a tab control with a number of tabs, each of which has on it a subform linked to frmProjects using ProjNo. On one of the tabs is a subform sfrWarranty. On sfrWarranty is a combobox cboUnit which is used to choose a unit. In the row source for cboUnit, I went into the SQL statement and in Criteria under ProjNo, entered "Forms!sfrWarranty.cboProjNo" (without the quotes) to limit the units to choose from to those which pertain to the current project. All works well until I choose a different project using cboProject on the main form frmProjects. When I do this, the only way I can get the list in cboUnit on the subform is to go to RecordsRefresh. So far, I've not been able to determine the Event to apply to which control to make this happen automatically. Ivor |
#2
|
|||
|
|||
Linking
On Tue, 09 Jan 2007 03:34:53 GMT, "Ivor Williams"
wrote: I went into the SQL statement and in Criteria under ProjNo, entered "Forms!sfrWarranty.cboProjNo" (without the quotes) to limit the units to choose from to those which pertain to the current project. All works well until I choose a different project using cboProject on the main form frmProjects. When I do this, the only way I can get the list in cboUnit on the subform is to go to RecordsRefresh. So far, I've not been able to determine the Event to apply to which control to make this happen automatically. Requery the combo box in the AfterUpdate event of cboProjNo: Private Sub cboProjNo_AfterUpdate() Me.cboUnit.Requery End Sub John W. Vinson[MVP] |
Thread Tools | |
Display Modes | |
|
|