473,657 Members | 2,597 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

inner join query in access not working- can anyone look into this pls

46 New Member
Hi,,,

I have 2 tables in access: tblUrl (software Url, contract number- 2 columns)
and tblAccContract( 4 columns-accountid, contract id, contract date, email addr)

I am querying these two tables using inner join. I get the result properly, but unable to retrieve the values from those tables. I think the problem is with the query I used for joining these two tables.

Please check with this:

The output has to be like:"Download your software here: www.google.com. ..."
But it says: "Download your software here..."
It doesnt display the Url in the tblUrl table


code is:


strSQL ="SELECT tblAccContract. accountId,tblAc cContract.email Addr, tblAccContract. contractNo, tblUrl.software Url"
strSQL =strSQL & " FROM tblAccContract INNER JOIN tblUrl ON tblAccContract. contractNo = tblUrl.contract No"
strSQL =strSQL & " WHERE (tblAccContract .emailAddr)='" & strEmail &"'"
objRS.open strSQL,conn
strUrl=objRS("t blUrl.softwareU rl")
response.write strUrl


Anyone familiar with this - please check with the code....I just need to get the values from multiple tables when Join is sued in Access.


Thanks
Tanya
May 22 '07 #1
1 2095
jhardman
3,406 Recognized Expert Specialist
Tanya,

Welcome to the scripts DN.

I've never used "inner Join" before. you can relate the tables like this:
Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM tblAccContract, tblUrl WHERE tblAccContract.contractNo = tblUrl.contractNo AND emailAddr='" & strEmail &"'"
That said, I don't know why your code didn't work. I would suggest trying this and putting in a simple loop to list everything in the record set to troublshoot:
Expand|Select|Wrap|Line Numbers
  1. for each x in objRS.fields
  2.    response.write x & ": " & objRS(x) & "<br>" & vbNewLine
  3. next
  4.  
Let me know if this helps.

Jared
May 22 '07 #2

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

Similar topics

7
43667
by: Barry Young | last post by:
I am using Access to create a SQL query. It creates an Inner Join Query. I cut and paste the query into PL-SQL. When I try to execute the query I get an error. ORA 933 SQL command not properly ended. It highlights the INNER JOIN statement on the SQL command. Can someone recommend a utility to convert these Microsoft or Access SQL queries to PL SQL? Thanks!
11
2903
by: news-east.earthlink.net | last post by:
The scenario: two tables CustomerTable --------------- CustomerID OrderID CustomerName CustomerEmail
14
2554
by: Martin Lacoste | last post by:
Access 2000 Trying even the most basic queries - select queries joining (inner join) two tables - and the results are not updatable, and I can't tell why they aren't. All permissions are on, recordset is dynaset, unique values is no, etc.. etc.. Here's the SQL if it helps..: SELECT tbl.ID FROM tbl INNER JOIN Master ON tbl.IDNumber = Master.IDNumber;
3
2284
by: LemonHead | last post by:
What is the syntax for an inner join when writing a inner join within a module ? I can not figure out why on some modules I see people using a parenthesis when writing an inner join ? See example below. "From (tblorders INNER JOIN ztblPrices ON " & _ "tblOrders.PriceID = ztblPrices.PriceID) INNER " & _ "JOIN ztblProducts ON ztblPrices.ProductID = " & _ "ztblProducts.ProductID)................
1
2450
by: bob | last post by:
what's the difference between inner join and outer join in sql?
6
9304
by: dmonroe | last post by:
hi group -- Im having a nested inner join problem with an Access SQl statement/Query design. Im running the query from ASP and not usng the access interface at all. Here's the tables: tblEmployees empId -- EmpName -- EmpRole -- EmpManager -------....------------.... ---------....--------------- 1........ dan yella..........1..........2
3
2925
by: janko.klemensek | last post by:
Hello. In the following query: SELECT tblDokumentiDetails.ID_Artikel, - tblDokumentiDetails.Kolicina AS Kolicina FROM (tblDokumenti INNER JOIN tblDokumentiDetails ON tblDokumenti.ID_Dokument = tblDokumentiDetails.ID_Dokument) INNER JOIN . AS ZadnjaInventura ON (tblDokumentiDetails.ID_Artikel = ZadnjaInventura.ID_Artikel) AND
12
13179
by: Chamnap | last post by:
Hello, everyone I have one question about the standard join and inner join, which one is faster and more reliable? Can you recommend me to use? Please, explain me... Thanks Chamnap
9
11915
by: shapper | last post by:
Hello, I am used to SQL but I am starting to use LINQ. How can I create Left, Right and Inner joins in LINQ? How to distinguish the different joins? Here is a great SQL example: http://www.codinghorror.com/blog/archives/000976.html
4
3347
by: AXESMI59 | last post by:
I created a query in the Access Query Builder that I modified to use with VBA Code so I could reuse it for any record I choose. The one that I created with the Access Query builder works beautifully with the hardcoded criteria. The VBA version with my criteria being set by a variable returns Error 3021. I am using a DAO Recordset and all I want to do is retrieve the data to place into a report. The Original made in the Access Query Builder:...
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8730
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.