Combo box drop down list

J

jwhittrn

I need the dummies version of how to add a drop down list to a word document
please. I've tried using help but it's not helping! I need to create a
picklist with about 25 choices. The selection will need to result in another
field auto-populating, but at this point I just need to know how to populate
my pick list.

THANK YOU SO VERY MUCH in advance!!!
 
K

Karl E. Peterson

jwhittrn said:
at this point I just need to know how to populate my pick list.

Not sure if you're wondering how to trigger the fill, which would be something like
this...

Private Sub Document_New()
Call FillList
End Sub

Private Sub Document_Open()
Call FillList
End Sub

Or the actual mechanics of the fill, for example...

Private Sub FillList()
Dim db As Database
Dim rs As Recordset
Dim sql As String

' TheDatabase is defined globally in MBuildLabels
Set db = DBEngine.Workspaces(0).OpenDatabase(TheDatabase)
Set rs = db.OpenRecordset("SELECT Lists.* FROM Lists;", dbOpenSnapshot,
dbReadOnly)

With cboLists
Do While Not rs.EOF
.AddItem CStr(rs!ListID) & " - " & rs!ListName
rs.MoveNext
Loop
.ListIndex = -1
End With
End Sub
 
J

jwhittrn

Actually, I was looking for the simple non VB button, which I did find (I
knew it was there I just was using the wrong toolbar) now i need to know how
to use the "calculate on exit" I believe it is to auto populate another
field..

thanks for your help!
 
B

bryan

I have used the "calc on exit" to populate a reference.
the reference being referred to the bookmark
To create a reference:
Ctrl + 9 then type within the brackets ref textxx \* charformat
then F9

Once you tab out of field textxx it will populate the ref mark

Bryan
 

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