Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2008

Tip: Looking for answers? Try searching our database.

Expression in query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Radhika - 08 May 2008 15:03 GMT
The query expression I am trying to build involves two tables. The first is
called 'tbl_NewInfo' and involves a field called 'XRT' with options 'Yes' and
'No'. The second is called 'tbl_TEPRecords' and involves the fields called
'XRTEndDate' (short date input mask) and 'XRT' with the options '1-3months,
'3-6 months', '>6months'. I want the query expression to give me the value
entered in the field 'XRT' (tbl_TEPRecords) if the
'XRTEndDate'(tbl_TEPRecords) is blank, but 'XRT' (tbl_NewInfo) is selected as
'Yes'. How could I go about doing this?

Thankyou.
Radhika
KARL DEWEY - 08 May 2008 17:24 GMT
Your table 'tbl_NewInfo' has only one field (Yes/No) so how do you relate the
two tables?
Signature

KARL DEWEY
Build a little - Test a little

> The query expression I am trying to build involves two tables. The first is
> called 'tbl_NewInfo' and involves a field called 'XRT' with options 'Yes' and
[quoted text clipped - 7 lines]
> Thankyou.
> Radhika
Radhika - 08 May 2008 17:59 GMT
'tbl_NewInfo' actually has several fields. Both 'tbl_NewInfo' and
'tbl_TEPRecords' have a field called 'ID#' that are related. I only mentioned
the Yes/No field as it was the one I wanted to include in my expression.

> Your table 'tbl_NewInfo' has only one field (Yes/No) so how do you relate the
> two tables?
[quoted text clipped - 10 lines]
> > Thankyou.
> > Radhika
KARL DEWEY - 08 May 2008 18:56 GMT
Try this --
SELECT tbl_NewInfo.XRT, tbl_NewInfo.[ID#], tbl_TEPRecords.XRTEndDate,
tbl_TEPRecords.XRT
FROM tbl_NewInfo INNER JOIN tbl_TEPRecords ON tbl_NewInfo.[ID#] =
tbl_TEPRecords.[ID#]
WHERE (((tbl_NewInfo.XRT)=True) AND ((tbl_TEPRecords.XRTEndDate) Is Null));

Signature

KARL DEWEY
Build a little - Test a little

> 'tbl_NewInfo' actually has several fields. Both 'tbl_NewInfo' and
> 'tbl_TEPRecords' have a field called 'ID#' that are related. I only mentioned
[quoted text clipped - 14 lines]
> > > Thankyou.
> > > Radhika
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.