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
|
|||
|
|||
continuous subform combo
I have a subform that uses three combo boxes to select items for a record.
The selectable values of the last two combo boxes depend on what is selected in the previous combo boxes. This is the programming I'm using: 'after update' Dim sTypeSource As String sTypeSource = "SELECT [DeficiencyType].[TypeCode], [DeficiencyType].[CategoryCode], [DeficiencyType].[DeficiencyType] " & _ "FROM DeficiencyType " & _ "WHERE [CategoryCode] = " & Me.Combo51.Value Me.Combo53.RowSource = sTypeSource Me.Combo53.Requery Me.Combo53.SetFocus and as Row source in SQL: SELECT DeficiencyType.TypeCode, DeficiencyType.CategoryCode, DeficiencyType.DeficiencyType FROM DeficiencyType WHERE (((DeficiencyType.CategoryCode)=1)); This works great in single form, but I need to put this as a continuous subform. The problem is that when changing values in the new record, the previous records change. I need to keep selected values the same, so that the user can take a look to verify all records are correct and edit if necessarry. Oh, and I checked my control sources, they're all there and correct. |
#2
|
|||
|
|||
continuous subform combo
Hi,
The problem is that Access continuous form, there is ONLY ONE combo box (for all the displayed rows), well, one per column in the table. If the combo box rows source has to be changed for each row, dependant of some other "columns" of the row, use alternate design, such as form-sub-form design, where the sub-form can change accordingly to the active row (example, table of bills, the electricity bill has different information than a city taxes bill). Such designs are also accommodated with table and 'sub-table', read, here, a sub-table as a full table, but in a one to one relation with the main table. (A one to one relation does not force the presence in the 'right side' of the relation; a one to one relation is a relation where the second ''one", means, in fact, "zero or one" row). IF a full sub-form design is or seems to be an overkill, think about the possibilities of using the combo box OUTSIDE the detail section of the form. Hoping it may help, Vanderghast, Access MVP "MikeLostinWoods" wrote in message ... I have a subform that uses three combo boxes to select items for a record. The selectable values of the last two combo boxes depend on what is selected in the previous combo boxes. This is the programming I'm using: 'after update' Dim sTypeSource As String sTypeSource = "SELECT [DeficiencyType].[TypeCode], [DeficiencyType].[CategoryCode], [DeficiencyType].[DeficiencyType] " & _ "FROM DeficiencyType " & _ "WHERE [CategoryCode] = " & Me.Combo51.Value Me.Combo53.RowSource = sTypeSource Me.Combo53.Requery Me.Combo53.SetFocus and as Row source in SQL: SELECT DeficiencyType.TypeCode, DeficiencyType.CategoryCode, DeficiencyType.DeficiencyType FROM DeficiencyType WHERE (((DeficiencyType.CategoryCode)=1)); This works great in single form, but I need to put this as a continuous subform. The problem is that when changing values in the new record, the previous records change. I need to keep selected values the same, so that the user can take a look to verify all records are correct and edit if necessarry. Oh, and I checked my control sources, they're all there and correct. |
Thread Tools | |
Display Modes | |
|
|