A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

continuous subform combo



 
 
Thread Tools Display Modes
  #1  
Old January 4th, 2007, 03:23 PM posted to microsoft.public.access.forms
MikeLostinWoods
external usenet poster
 
Posts: 20
Default 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  
Old January 4th, 2007, 06:02 PM posted to microsoft.public.access.forms
Michel Walsh
external usenet poster
 
Posts: 2,404
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.