On the frmSurvey I select the Topic (The primary field is a number,
however
on the Combo Box I show the Topic Name-Not the number). I need to have a
tesxt box that shows me the Description of that Topic. Maybe I am not
using
the right way to do this.
For Example
Fields on my tblTopic
TopicID - 1
Topic - ISO 14001
Description - Environmental Management System...........(Note Descriptions
may be too long for a ComboBox - currently cutting off the description
after
255 characters.)
Fields on my tblSurvey
SurveyID - 1
Survey - Do you have an EMS system?
Topic - Lookup to tblTopic Topic Field (set to show the Topic Field that
would show ISO 14001)
Form Survey
Survey - Do you have an EMS system?
Topic - ComboBox where I would select ISO 14401
I need to have the description, from the Topic I select on the form,
populate on the text field.
Currently it shows if the Topic is populated, Not all surveys have a
topid,
therefore if a Topic is blank, I get an #Error on the Text Field for
Description.
I hope this helps
--
Regards - MD
Damon Heron said:
It looks like - correct me if I am wrong - you are testing topicID
against
topic.
=Nz(DLookUp("[definition]","tbltopic","[topicid]= " & [topic]), 0)
I thought you said topic was a field in the same table....
Try the above and substitute a real id (in your tbltopic) for topic,
like:
=Nz(DLookUp("[definition]","tbltopic","[topicid]= 5"), 0)
If that works, then the problem is the topic field on your form.
Damon
Yes I am absolutely certain TopicID isa my primary field and is set as
an
AutoNumber--
Regards - MD
:
You're absolutely certain that TopicID is defined as a Number in the
table?