Question:
very Basic Doubt in MS-ACCESS, pls help?
haridravid
2010-03-08 10:40:45 UTC
I have 2 tables (say table 1, table 2)

I have a record in table 1 which matches with multiple records in table 2. now i have a form which will access data from both the tables. But I dunno how to display all the records which match with table 1?
For me, in the form only 1 record from table 2 is displayed at a time.

Example: I have 6 records in table 2, and 2 records in table 1, with each record in table 1 relate with 3 records in table 2. Now when I open the form, there are 6 records with table 2 data being displayed 1 by 1 while displaying the corresponding table 1 data repeatedly. I want all 3 matching data of table to be displayed in 1 instance.

*I am not well versed in access, which by now u would have found out. So am almost zero in SQL.
But i really need this for a job here...
Three answers:
Yogendra R
2010-03-08 12:13:02 UTC
You have to create grid inside grid so in outer grid your can show master (table1) data and inner grid table 2 data.

See http://www.codeproject.com/KB/webforms/MasterDetail.aspx to know how.

Hope this will help or just give direction in which you have to do google search.
iqbal
2010-03-08 20:16:00 UTC
Hi,

First u write a query that fetches desired records. Then set this query as record source of the for.



Write the query like this: Suppose id is the common field in both the tables, on which u want to match the records. Table1 and Table2 are names of 2 tables.



Query:

Select Table1.field1,Table1.field2,Table2.field1,Table2.field2 from Table1,Table1 where Table1.id=Table1.id
?
2017-01-16 13:43:18 UTC
expensive buddy ! open the seen elementary 6.0 click on the upload ins menu.after choosing that decision an pop memu will apper referred to as addins. click in this determination u would be discover an small communication container appers referred to as seen archives supervisor. on that decision u can open an msaccess report in vb.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...