If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > Auto Fill Search Field

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-16-11, 17:59
hireconor hireconor is offline
Registered User
 
Join Date: Sep 2011
Posts: 2
Question Auto Fill Search Field

Is this the correct SQL syntax for auto populating 4 rows in a .ACCDB 2007 field? When testing, it auto populates for a couple seconds, then Access freezes.

I'm modifying the original SQL in the Property Sheet -> Row Source that auto populates 3 columns (Last Name, First Name, Birthday):

Code:
SELECT [dbo_Person].[idPerson], [dbo_Person].[Last_Name], [dbo_Person].[First_Name], [dbo_Person].[Birth_Date]
FROM dbo_Person
ORDER BY [dbo_Person].[Last_Name], [dbo_Person].[First_Name], [dbo_Person].[Birth_Date]
To this in trying to add a 4th column that's just an ID number in the first column:
Code:
SELECT [dbo_TestData].[TestNum], [dbo_Person].[idPerson], [dbo_Person].[Last_Name], [dbo_Person].[First_Name], [dbo_Person].[Birth_Date]
FROM dbo_TestData, dbo_Person
ORDER BY [dbo_TestData].[TestNum], [dbo_Person].[Last_Name], [dbo_Person].[First_Name], [dbo_Person].[Birth_Date]
[TestNum] will populate, but then after about 2 seconds it will freeze Access and not respond.
Reply With Quote
  #2 (permalink)  
Old 09-19-11, 10:49
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
There's no JOIN in your sql statement to tie those two tables together.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
  #3 (permalink)  
Old 09-21-11, 17:00
hireconor hireconor is offline
Registered User
 
Join Date: Sep 2011
Posts: 2
Re:

Quote:
Originally Posted by blindman View Post
There's no JOIN in your sql statement to tie those two tables together.
How would I add the Join statement to it?
Reply With Quote
  #4 (permalink)  
Old 09-22-11, 15:56
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
Look up "JOIN" in Books Online.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
  #5 (permalink)  
Old 09-29-11, 10:43
paultech paultech is offline
Registered User
 
Join Date: Sep 2011
Posts: 71
Thumbs up Try Join Example to using at your query

Try this query in your script after change names of coures

Quote:
SELECT UrlCheck.ChangeStatus, UrlCheck.Date, WebSite.Title, WebSite.URL
FROM UrlCheck INNER JOIN
WebSite ON UrlCheck.ID = WebSite.URLID

Last edited by paultech; 09-29-11 at 10:45. Reason: repair sql query
Reply With Quote
  #6 (permalink)  
Old 10-20-11, 07:13
jassi.singh jassi.singh is offline
Registered User
 
Join Date: Sep 2011
Posts: 75
Reply With Quote
Reply

Tags
access 2007, sql

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On