W
Wayne
I'm posting this problem again in the hope that someone can
help me:
Ok...here's what I have.
I have a main form called PrintRequisition with a subform
called PrintReq_Subform. The subform contains a combo
called Type that gets its values from the following query:
SELECT Print_Type.PrintTypeID, Print_Type.PrintType FROM
Print_Type;
There is another combo called PaperSize with the following
query as the rowsource:
SELECT Print_Fee.PrintFeeID, Print_Fee.PrintTypeID,
Print_Fee.PaperSize FROM Print_Fee WHERE
(((Print_Fee.PrintTypeID)=[Forms]![PrintRequisition]![PrintReq_Subform]![Type]));
And I have Me!PaperSize.Requery on the got focus event of
the PrintSize combo.
So what's supposed to happen is this. I select a print type
from the Type combo and then when I select the PrintSize
combo it only displays the values relevant to the print
type selected. This seems to work but when I click into the
next record and select a different value in the Type combo
the requery makes the previously selected values in the
PaperSize combo disapear. The subform is displayed in
Datasheet view, is that part of the problem?
Steve Schapel made the following suggestion, but I still
ended up with the same results:
I don't know how this works in datasheet view, I have never
used a
datasheet view form. But if you make it a continuous view
form, try
this... On the Enter event of the PaperSize combobox, put
code like this:
Me.PaperSize.RowSource = "SELECT PrintFeeID, PrintTypeID,
PaperSize
FROM Print_Fee WHERE PrintTypeID =" & Me.Type
..... and then on the Exit event of the PaperSize combobox:
Me.PaperSize.RowSource = "SELECT PrintFeeID, PrintTypeID,
PaperSize
FROM Print_Fee"
I hope someone can help.
Thanks
help me:
Ok...here's what I have.
I have a main form called PrintRequisition with a subform
called PrintReq_Subform. The subform contains a combo
called Type that gets its values from the following query:
SELECT Print_Type.PrintTypeID, Print_Type.PrintType FROM
Print_Type;
There is another combo called PaperSize with the following
query as the rowsource:
SELECT Print_Fee.PrintFeeID, Print_Fee.PrintTypeID,
Print_Fee.PaperSize FROM Print_Fee WHERE
(((Print_Fee.PrintTypeID)=[Forms]![PrintRequisition]![PrintReq_Subform]![Type]));
And I have Me!PaperSize.Requery on the got focus event of
the PrintSize combo.
So what's supposed to happen is this. I select a print type
from the Type combo and then when I select the PrintSize
combo it only displays the values relevant to the print
type selected. This seems to work but when I click into the
next record and select a different value in the Type combo
the requery makes the previously selected values in the
PaperSize combo disapear. The subform is displayed in
Datasheet view, is that part of the problem?
Steve Schapel made the following suggestion, but I still
ended up with the same results:
I don't know how this works in datasheet view, I have never
used a
datasheet view form. But if you make it a continuous view
form, try
this... On the Enter event of the PaperSize combobox, put
code like this:
Me.PaperSize.RowSource = "SELECT PrintFeeID, PrintTypeID,
PaperSize
FROM Print_Fee WHERE PrintTypeID =" & Me.Type
..... and then on the Exit event of the PaperSize combobox:
Me.PaperSize.RowSource = "SELECT PrintFeeID, PrintTypeID,
PaperSize
FROM Print_Fee"
I hope someone can help.
Thanks