[AccessD] Lookup control on a form

Mike and Doris Manning mikedorism at ntelos.net
Thu Feb 13 11:02:00 CST 2003


If all you want is the TopicID and the Topic in the dropdown, then why not
just bind it to tblTopic, set the Column Count to 2, and adjust the Column
Width property to reflect whether or not you want to see both columns or
just the Topic column.  Set the Bound Column of the dropdown to 1 and you
will be all set to display the questions in whatever control you choose.
 
Doris Manning
Database Administrator
Hargrove Inc.
www.hargroveinc.com

-----Original Message-----
From: accessd-admin at databaseadvisors.com
[mailto:accessd-admin at databaseadvisors.com] On Behalf Of Klos, Susan
Sent: Thursday, February 13, 2003 11:37 AM
To: 'accessd at databaseadvisors.com'
Subject: [AccessD] Lookup control on a form


I seem to have hit a brick wall.  Hope someone can help. I am trying to
create an FAQ database for use in the office.  
 
I have a form bound to tblQuestion
 QuestionID PK
  TopicID FK from tblTopic
 
I want a dropdown control in the header that will look up topics in tblTopic
and afterupdate find all the questions on this topic.   I need the dropdown
control to contain the topic as well as the TopicID.  I tried using the
wizard but the control does not contain the topic unless I bind the form to
an SQL statement that contains both tables.  When I use this SQL:
SELECT tblQuestion.QuestionID, tblQuestion.TopicId, tblTopic.Topic,
tblQuestion.Question, tblQuestion.QuestionerID, tblQuestion.Answer,
tblQuestion.SourceID, tblQuestion.DateAsked, tblQuestion.DateAnswered,
tblQuestion.OtherSourceID, tblQuestion.Reference, tblQuestion.Notes
FROM tblTopic INNER JOIN tblQuestion ON tblTopic.TopicID =
tblQuestion.TopicId;
And then try to use the wizard to create the find dropdown I get this error:
Syntax error in FROM clause
If I change the location of Topic ID i.e. tblTopic.TopicID  I get the same
error.
 
I know I am missing something basic here, I just can't figure out what it
is. 
 
    
    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030213/ac8fbb18/attachment-0002.html>


More information about the AccessD mailing list