Selasa, 23 April 2013

Re: [MS_AccessPros] Query from a sub form

 

Hi Duane
 
I hadn't seen this reply and I have posted a slightly different but similar question in another post (relating to how it behaves in a form without the complication of a subform) - along with a further issue i have. Perhaps you will comment on that one too please.
 
I will have a look at your suggestion for the subform and see if it gets me anywhere.
 
thank you
 
Phil
 
 
 
 


________________________________
From: Duane Hookom <duanehookom@hotmail.com>
To: Access Professionals Yahoo Group <ms_access_professionals@yahoogroups.com>
Sent: Friday, 19 April 2013, 19:59
Subject: RE: [MS_AccessPros] Query from a sub form


 

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: mailto:MS_Access_Professionals%40yahoogroups.com
> From: mailto:pdk444444%40yahoo.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


[Non-text portions of this message have been removed]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)
Recent Activity:
MARKETPLACE


.

__,_._,___

Tidak ada komentar:

Posting Komentar