Phil,
You don't really have a question. We can only assume based on some guess work and previous issues from news groups that your values in the sub-cat (probably a combo box) aren't displaying correctly. This is typical of datasheet or continuous forms with cascading combo boxes.
I don't limit the second combo box values but rather create a column in the row source that sorts the results to display the appropriate sub-cats at the top of the list. I will also add some code to warn the users if they select an inappropriate value.
There are other solutions that might work in a continuous form but probably not in datasheet view.
Duane Hookom MVP
MS Access
----------------------------------------
> To: MS_Access_Professionals@yahoogroups.com
> From: pdk444444@yahoo.co.uk
> Date: Fri, 19 Apr 2013 12:15:34 +0000
> Subject: [MS_AccessPros] Query from a sub form
>
> I have 2 tables called category and sub-cat which are maintained by a form/subform arrangement. Each Category can have many sub-cats (or none at all)
>
> I have another form with 2 fields - one called category which allows the user to select from the list of rows from the category table and one called sub-cat which runs a query to allow the user to select from only the sub-cats relating to the entered category.
>
> This query selects the correct records by using the criteria [forms]![formname]![cat id]
>
> All this works perfectly well.
>
> However, I am now trying to create another form with a subform (in datasheet mode) that has the 2 fields category and sub-cat and trying to use the same type of query to look up the correct sub-cats for the entered category (in each row of the subform).
>
> the criteria line in the query is [forms]![subformname]![cat id]
>
> I haven't really explained this very well !! does anyone understand what I am getting at and know why it won't work?
>
> cheers
>
> Phil
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar