473,321 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Displaying Records associated with Distinct Column Values

Hi,
I am new to VBA, I am trying to create a form that will take the DISTINCT values of a one column and then display all the records associated to that value in the form. I am not sure how clear was that, but this example will make it clear. I have this table with two columns Supplier and the PartNo.

Supplier PartNo
A 1
A 2
A 3
B 1
B 2
C 1


I want to create a form that will be like this (there is a tab between the alpabets and the numbers. due to some reason on posting they are very close to each other).


Supplier 'A'
Parts
1
2
3

The next record will be

Supplier 'B'
Parts
1
2

and so on. Seems like a simple one but when I make the form control source a query using the DISTINCT keyword on Supplier column, I get is

Supplier 'A'
Parts
-----
-----
-----

Three blank rows which are actually the no. of distinct values. Any help on this will greatly appreciated.
Thanks.
Mar 4 '08 #1
4 1483
Rabbit
12,516 Expert Mod 8TB
You need to use a continuous subform in a continous form to get the look you desire. And you won't use the DISTINCT keyword. The problem is not a matter of distinctiveness.
Mar 4 '08 #2
Actually the main form I don't want to be continous as I want to click the next and back button to move from a supplier to supplier. But I think i can try using the continous sub-form and see how it goes.
Thanks
Mar 4 '08 #3
It worked as I wanted it to be, thanks a lot.
Mar 4 '08 #4
Rabbit
12,516 Expert Mod 8TB
Not a problem, good luck.
Mar 4 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Boefje | last post by:
Hello, I need to get all records from a table where a for a given playerid no field enddate exists with value NULL. table player_team: id, playerid, startdate, enddate 1, ...
1
by: Bryan Zash | last post by:
When querying a bit field, I am encountering a problem with MS SQL Server returning a larger number of records for a table than the actual number of records that exist within that table. For...
8
by: tom | last post by:
I am new to SQL administration. >From a list of IDs that are the primary key in one table (i.e. Customer Table), I want to make changes in tables that use those IDs as a foreign key. ...
38
by: Rex | last post by:
In a table, I have number of records belonging to a particular ID now if I enter a value in one of the fileds of this table I want it to be copied in all the records belonging to this particluar...
0
by: Gumbyu | last post by:
Hi experts! I created a view about 4 months ago that has been working great. The view populates from three tables on joins and displays the records that I want (see below with the selected...
1
by: RussCRM | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
2
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
1
watertraveller
by: watertraveller | last post by:
Hi all. My ultimate goal is to return two columns, where no single value appears anywhere twice. This means that not only do I want to check that nothing from column A appears in column B and...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.