MsSQL

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDatabasesMsSQL

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old July 16th, 2012, 09:05 AM
ahmadmahrous_1 ahmadmahrous_1 is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 1 ahmadmahrous_1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 41 sec
Reputation Power: 0
Refer to Current Record in SQL

Consider those two tables in Access 2010:

ActionReg
ActionID Taskt1 Actiont1
1 t1 t1a1
2 t2 t2a1
3 t3 t3a1
4 t1 t1a2
5 t1 t1a3
6 t2 t2a2

TaskReg
ActionID Taskt2 Actiont2
1 t1
2 t2
3 t3

I give the field Actiont2 the following properties (in Lookup tab in Design View):

Display Control = ListBox
Row Source Type = Table/Query

Now I want this query to retrive from Actiont1 into Actiont2 the records related only to the value of Task2 so the result will be:

TaskReg
ActionID Taskt2 Actiont2
1 t1 (t1a1,t1a2,t1a3)
2 t2 (t2a1,t2a2)
3 t3 (t3a1)

I used:

SELECT ActionReg.Action1
FROM ActionReg, TaskReg
WHERE [ActionReg]![Task1]=[TaskReg]![Task2];

But it retrives all records in Action1 if Task1 = any record in Task2.

Reply With Quote
  #2  
Old July 16th, 2012, 12:01 PM
jamespayne's Avatar
jamespayne jamespayne is offline
Editor-in-Beef
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Sep 2008
Location: South Florida
Posts: 31 jamespayne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 9 h 48 m 44 sec
Reputation Power: 11
I would suggest you post this over at our sister forum, www.forums.devshed.com . We have a lot of SQL experts that will be more than happy to assist you.

Reply With Quote
Reply

Viewing: Tutorialized ForumsDatabasesMsSQL > Refer to Current Record in SQL


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap