Entire field disapeared in subform!

G

Guest

I don't think the same question has been answered before, so could someone
please help? Much appreciated

I have 2 tables, namely tblCategory and tblType, to be used as list for 2
combos in a form,
1) tblCategory has fields of CategoryID and Category;
2) tblType has fields of TypeID, Type, and CategoryID -- where CategoryID
field here is a combo with RowSource as SELECT DISTINCTROW [CategoryID],
[CategoryName] FROM tblCategory ORDER BY [CategoryName];

When I open tblType, a popup window promps and asks me to "enter parameter
value" of CategoryName. At this stage, the table behind displays only TypeID
and Type of the 1st record. If I don't enter anything and close the popup,
the full table content displays as normal. This is fine.

The problem is if I have the same table (tblType) in a TabControl as
subform, the same popup appears upon opening, but if I just close it, all
records in CategoryID field become hidden!
 
M

Michel Walsh

Hi,


It may be either a typo error, where CategoryName is miss-spelled,
including in the parent-child link (main form-sub form). Maybe something
else too, on the other hand. Just to be sure you checked for typos. Can you
open the table alone, from the database window? Can you use the same
sub-form, WITHOUT problem, in another brand new (temporary) form ? Those
tests may help to know where the problem really is.





Hoping it may help,
Vanderghast, Access MVP
 
G

Guest

Oh, yes ofcourse! I've made a silly mistake in naming the CategoryName field
which I never thought of before you kindly pointed out. Thanks :)
1) tblCategory has ..."Category";
2) tblType has ... with RowSource as SELECT DISTINCTROW [CategoryID],
["CategoryName"] FROM tblCategory ORDER BY ["CategoryName"];

An inconsistant use of field name where "Category" and "CategoryName" are
meant to be the same :p

Michel Walsh said:
Hi,


It may be either a typo error, where CategoryName is miss-spelled,
including in the parent-child link (main form-sub form). Maybe something
else too, on the other hand. Just to be sure you checked for typos. Can you
open the table alone, from the database window? Can you use the same
sub-form, WITHOUT problem, in another brand new (temporary) form ? Those
tests may help to know where the problem really is.





Hoping it may help,
Vanderghast, Access MVP

Sam Kuo said:
I don't think the same question has been answered before, so could someone
please help? Much appreciated

I have 2 tables, namely tblCategory and tblType, to be used as list for 2
combos in a form,
1) tblCategory has fields of CategoryID and Category;
2) tblType has fields of TypeID, Type, and CategoryID -- where CategoryID
field here is a combo with RowSource as SELECT DISTINCTROW [CategoryID],
[CategoryName] FROM tblCategory ORDER BY [CategoryName];

When I open tblType, a popup window promps and asks me to "enter parameter
value" of CategoryName. At this stage, the table behind displays only
TypeID
and Type of the 1st record. If I don't enter anything and close the popup,
the full table content displays as normal. This is fine.

The problem is if I have the same table (tblType) in a TabControl as
subform, the same popup appears upon opening, but if I just close it, all
records in CategoryID field become hidden!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top