Rabu, 24 April 2013

Re: [MS_AccessPros] Subform Query in datasheet view

 

Hi Duane
 
I thought your idea would be ideal ......
 
However, when the users are selecting a sub-cat, rather than moving up and down the list, they simply enter the first letter of the description which can take them anywhere on the list (ie away from the part of the list for the entered category)
 
Having looked at it a bit closer, the sorting doesn't work anyway - the way I have done it. When you say 'create a column' in the row source, what would that column be in this context?
 
I only have category and sub-cat to play with - how do I get the subcats for the category entered to the top of the list.
 
But given the problem of selection mentioned above (ie by using the 1st letter of description) is it worth getting to the bottom of this sorting?
 
cheers
 
Phil
 
 

________________________________
From: Duane Hookom <duanehookom@hotmail.com>
To: Access Professionals Yahoo Group <ms_access_professionals@yahoogroups.com>
Sent: Tuesday, 23 April 2013, 19:04
Subject: RE: [MS_AccessPros] Subform Query in datasheet view

 
Phil,
That is why I suggested this in your previous thread/question:

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.

Duane Hookom MVP
MS Access

----------------------------------------
> From: mailto:JohnV%40msn.com
>
> Phil-
>
>
>
> As long as the Row Source of the second combo is NOT filtered, it should work correctly and show all values on all rows. If you filter it, that's when the values will disappear because there's really only one copy of the control for all rows.
>
>
> From: mailto:MS_Access_Professionals%40yahoogroups.com [mailto:mailto:MS_Access_Professionals%40yahoogroups.com] On Behalf Of Phil Knowles
>
> Hi John
>
> The record source of the form is simply the table it is based on.
>
> The row source of Category is
> SELECT [category].id, [category].name from [category] order by ........
> The control source is Category
>
> The row source of Sub-cat is
> SELECT [sub cat id], [sub cat name] from [sub cats query]
> The control source is Sub-cats
>
> aha - maybe the control source should be sub cats query ?
>
> sub cats query has in its criteria field = [forms]![formname]![cat id]
>
> cheers
>
> Phil
> ________________________________
> From: John Viescas <mailto:JohnV%40msn.com <mailto:JohnV%40msn.com> >
>
> Phil-
>
> What is the Record Source of your form, the Row Source of both combos, and
> the Control Source of both combos? You shouldn't have a display problem if
> the controls are bound to fields.
>
> John Viescas, Author
>
> [mailto:mailto:MS_Access_Professionals%40yahoogroups.com] On Behalf Of pdk444444
>
> I have a Category table and a Sub-cat table which are maintained by a
> form/subform arrangement.
>
> Each Category may have 1 or more sub-cats (or none at all)
>
> I have another table which contains fields for Category and Sub-cat each of
> which are selected from a drop down list. They are selected seperately but I
> want the sub-cats list to only contain the subcats that are valid for the
> entered category.
>
> I achieve this by having a query to select the sub-cats with criteria
> [Forms]![Formname].[cat id].
>
> In form view everything is fine.
>
> I have 2 issues.
>
> 1. When the form is viewed in datasheet view (which it mostly is) I only see
> the values for sub cat for those records with matching categories. The
> records with other categories show as a blank field in sub-cat.
>
> When i move to a record with a different category, the sub-cat values for
> all records with that category appear and the sub-cats for all other
> categorys go blank.
>
> 2. Accepting the way things are in issue 1, up until recently I have been
> able to filter by sub-cat and sort by the sub-cat field in datasheet view
> but now when I try to do this no records are shown.
>
> Any help with either or both of these issues would be appreciated.
>
> 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 (9)
Recent Activity:
MARKETPLACE


.

__,_._,___

Tidak ada komentar:

Posting Komentar