473,396 Members | 1,608 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,396 software developers and data experts.

how to access a field of one table from the other table in a database

hi....
its very urgent.... i have a 2 tables in table1 contains 2 fields-username(text) and points(number) and table2 contains points(number) and image(attachment)
fields.... what i want is, the form contains a combobox, when i select the particular points of a user it should display the points with images in a form...

eg: points(table1): 20 and points(table2):5,10,15,20,25,30

images(table2):img1,img2..................

when i select d points of table1 in a combobox then it should display the points of table2 ie 5,10,15,20 and the corresponding images in a form....
plz help me...........
frontend:vb6.0
backend:access2007
i am using adodb
Oct 25 '07 #1
6 1211
debasisdas
8,127 Expert 4TB
That can be done simply byusing SQL .

Pass the value of first table in the where condition to query the second table.
Oct 25 '07 #2
rekhasc
66
That can be done simply byusing SQL .

Pass the value of first table in the where condition to query the second table.
sql= select table1.points,table2.points,table2.images from table1,table2 where table1.points=" &combo1.text
i tried this query but its not displaying the all the points which are present in table2
Oct 25 '07 #3
sql= select table1.points,table2.points,table2.images from table1,table2 where table1.points=" &combo1.text
i tried this query but its not displaying the all the points which are present in table2
i tried this query,but from this query am not getting..its not working..if any one know the query for this plz give me the correct query its very urgent and also it should show the points of other table and also the corresponding images in the form.........
Oct 25 '07 #4
debasisdas
8,127 Expert 4TB
Is there any relation between these two tables.
Oct 25 '07 #5
9815402440
180 100+
hi
try this logic

dim rstT1
dim rstT2

open both recordsets

use following command to filter records in rstT2
rstT2.Filter = "Points = " & rstT1.fields("User").value & ""

with rstT2
.movefirst
while not .eof
debug.print .fields("Image").value
.movenext
wend

end with


regards
manpreet singh dhillon hoshiarpur
Oct 25 '07 #6
daveftl
43
sql= select table1.points,table2.points,table2.images from table1,table2 where table1.points=" &combo1.text
i tried this query but its not displaying the all the points which are present in table2
try this:

SELECT table1.point, table2.image FROM table1, table2 WHERE table1.point = table2.point
Oct 25 '07 #7

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

Similar topics

8
by: Vladimir | last post by:
Hello, I have a table in MS Access database. It has one field (with BYTE datatype) that has several properties set in Lookup tab of table Design View. Display Control = Combo Box. Row Source...
2
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
8
by: doomx | last post by:
I'm using SQL scripts to create and alter tables in my DB I want to know if it's possible to fill the description(like in the Create table UI) using these scripts. EX: CREATE TABLE(...
7
by: Ruben Baumann | last post by:
Just wondered if anyone has had occasion to use, or does use, FileMaker, or Raining Data's Omnis, or Alpha5's software, and how they compare with Access? Ruben
15
by: philip | last post by:
On a form, I have a datagridview. This datagridview is constructed on a dataset filled by a tableadapter. The table adapter do very well what it must do when filling dataset. Insertions,...
52
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
13
by: royaltiger | last post by:
I am trying to copy the inventory database in Building Access Applications by John L Viescas but when i try to run the database i get an error in the orders form when i click on the allocate...
2
nico5038
by: nico5038 | last post by:
Access 2007 Linkedtable manager refuses to relink tables having a field with the "Attachment" datatype. Problem: When placing a split database in another folder, the Linked table manager should...
0
by: Tony Hine | last post by:
Problem for Excel Developers One of the problems facing Excel developers moving into MS Access is actually the apparent similarity between MS Access tables and Excel spreadsheets. MS Access is...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.