I will quit fooling with the criteria.
I changed the criteria to read just as you have it below. I also changed
the bound columns as you suggested. The lookup tables are correct I am
assuming based on the fact that the dropdown lists are properly populated
(when they seem to work).
However, step by step this is what is happening.
When I open the orpsdata form, I get an input box asking for input for
Forms!orpsdata.frmtype.form.typecombobox. I hit cancel. This form does not
have any events identified.
As expected after changing the bound columns (per your last comments) the
previous slections from the dropdowns (that are stored in tblTypeSubType) do
not appear.
If I try to reenter data in the comboboxes, I can select from the
typecombobox. Then afterupdate should fire. I get another input box. If I
enter the value that should be automatically considered the dropdown for
subtype works. But only if I enter it in the input box.
However, now when I try to close it I get an error that says You cannot add
or change a record because a related recordd is required in a table 'zlookup:
type'.
I haven't seen this before.
You are probably getting as frustrated with me as I am with Access. But I
promise I won't dork with anything else unless you tell me to.
Marshall Barton said:
It looks like the typecombobox needs to have its BoundColumn
property set to 1 and its ColumnCount set to 2
Also, quit fooling around with the criteria. If you have
anything that Access can't find it will prompt you for a
value. You could just as well use:
[this is not what I want]
and you would get the same result as you keep getting with
the incomplete combo box reference. Assuming the form and
control names are correct, it should be:
Forms!orpsdata.Form1.FORM.typecombobox
If the list is still empty after all this, then double check
the value in the TypeID value in the [Zlookup: Type] table
is really what you think it is.
Papa said:
I think the issue lies in your other hand. The drop down has nothing in it.
When I reformatted the query criteria to include
Forms!orpsdata.Form1.Form.typecombobox
That took care of the input box appearing but then the dropdown no longer
had any choices. When I changed the critera back to
[Forms]![orpsdata].[Form1].[typecombobox]
the input box reappears, but my dropdowns have choices again.
Currently (with inputboxes showing up)
The rowsource for the type combobox is:
SELECT [Zlookup: Type].TypeID, [Zlookup: Type].Type FROM [Zlookup: Type]
ORDER BY [Zlookup: Type].TypeID;
The rowsource for the subtype combobox is:
SELECT [Zlookup: Subtype].SubtypeID, [Zlookup: Subtype].Subtype, [Zlookup:
Subtype].TypeID FROM [Zlookup: Subtype] WHERE ((([Zlookup:
Subtype].TypeID)=[Forms]![orpsdata].[Form1].[typecombobox]));
I have tried selecting different bound columns, etc and can not seem to get
it to work.
:
It's is not clear what you mean by "populated". If you mean
the value is not displayed, then that's what I would expect
since you just set the value to Null.
OTOH, if you mean the combo box has nothing in its drop down
list, then I would suspect that the typecombobox does not
have its BoundColumn property set correctly. Either that or
you've selected a value that doesn't have any matching items
in the subtype combo box.
Papa Jonah wrote:
That got rid of the input box, however the subtypecombobox is nolonger
populated. It was populated as long as I kept entering the proper answers
into the input box.
:
This is a new issue. I think the prompt may be coming from
a query that uses Forms!form1!typecombobox in its criteria.
Probably the subtypecombobox's RowSource query.
The problem is that this reference does not take the
form/subform arrangement into account. It needs to be like
the reference to the other combo box:
Forms!orpsdata.Form1.Form.typecombobox
Papa Jonah wrote:
One might hope that I would get this at some point, but until then - I
perservere.
Based on your last input, I have modified my afterupdate code to be:
Private Sub Typecombobox_AfterUpdate()
Forms!orpsdata.Form1.Form.subtypecombobox = Null
Forms!orpsdata.Form1.Form.subtypecombobox.Requery
End Sub
This combobox is in the subform, Form1.
I am able to change my selection in the combobox, but then I get an