Display memo field depending on combo box choice (?)

G

Guest

Hi - Newbie here... This is probably very simple but I can't seem to figure
it out.
I have created a form where I have a combo box that searches a field called
Topic. When user chooses the "topic", I would like the description(memo
field) to be displayed. It's sort of a lookup phone directory system where
the user needs to access any or all information pertaining to a particular
topic matter. Thanks so much for your help.
 
S

Steve Schapel

Lauri,

Do you mean you want the Description textbox to be visible with certain
Topic choices, and invisible for other Topic choices? If so, you can
put code on the After Update event property of the combobox, something
like this...

Select Case Me.Topic
Case "Something", "Something Else"
Me.Description.Visible = True
Case Else
Me.Description.Visible = False
End Select
 
G

Guest

Hi Steve and thanks for your help. I'll try to explain it simpler.
Basically what I want is for the user to be able to search a topic(fieldname:
topic, type: text) and then basically after either scrolling or typing in the
correct topic, I would like the corresponding definition of the topic to
display(fieldname: description, type: memo), almost like that of an online
dictionary.
 
S

Steve Schapel

Lauri,

Ah, that's a different matter... sorry I completely misunderstood your
original post.

Assuming that the form is bound to the table that contains the topic and
description, here's one way... Use an *unbound* combobox in the form
header for the topic selection. Let's say you name this combobox
TopicSelect. In the After Update event of the combobox, you could put
code like this...

Me.Topic.SetFocus
DoCmd.FindRecord Me.TopicSelect
Me.TopicSelect = Null

Should do the trick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top