Specific Navigation (Using a Query)

JKK

Registered User.
Local time
Today, 11:21
Joined
May 4, 2011
Messages
19
Hey guys,

Does any one know if it is possible to use the standard/built-in navigation in access (I have access 2007, but the question is valid for other versions), but omit certain records as you navigate?

I have a field: "companies" which falls into two types, for reference purposes call them TypeA and TypeB. I have a form which works perfectly, but I would like to streamline it for different users. One user would only be concerned with TypeA companies and the other with TypeB only.

I have buttons for navigation at the moment, but they basically are used to move to next/previous record. I would still like to navigate in the same way, only avoid TypeA companies; can that be done?
 
The only way to use the standard nav buttons to only navigate thru certain records is to base your form on a Query that only populates the form with those records.

In the Query Design Grid you'd set the Criteria for the field holding the 'company type' to

="Type A"

or

="Type B"

There are a number of ways you could implement this.

Have Different Front Ends for different users, based on the company types they work with. Your Query for the form would be modified as above.

Use the same Front End but have 2 different forms, modified as above.

Using the same Front End, In a Single View Form or a Continuous View Form, you could have a Command Button in the header to Filter the Form by TypeA or TypeB. Or you could simply Filter the form using the built in filter function off of the Records Menu, depending on the computer savvy of your users.

Linq ;0)>
 
Last edited:
Thank you, well worded. It works like a charm.

On a side note, I have a combobox and was wondering if it is possible to have the contents divided into two sections. Each section would then be sorted alphabetically in its own right.
For example, the contents of the combobox could be as follows:

AAA
BBB
CCC
___
aas
bbd
rrt​

The records in the top and bottom halves each have a field which would identify in which half they belong. All records are stored in the same table.

I realise this is quite a bit off topic, but you seem like the best person to ask - if I want the simplest solution. :)
 
The only way I can think of, off hand, would be to a new 'ranking' field, if you would, to your table. In this field, for the first group you want to appear, you'd enter a 1. For the second group records you'd enter a 2.

Now create a Query, with the 'ranking field' as the first field, followed by the field to be Alpha field (field to be alphabetized.)

Now, in the Query Design Grid, set sorting to Ascending for the first field then do the same thing for your second, Alpha, field.

Access in a Query sorts fields moving left-to-right, so the Query will sort the records

1 AAA
1 BBB
1 CCC
2 aas
2 bbd
2rrt


Now simply base your Combobox on Alpha field in this Query.

If the field you mentioned as determining which group they belong in only has two possible values, i.e. one value for every record in the first group and another for every record in the second group, you could use this field as the 'ranking' field.

Linq ;0)>
 
Last edited:
Yeah, that could work. Will give it a go.
 

Users who are viewing this thread

Back
Top Bottom