Solved

Change combobox values

Posted on 2003-11-03
2
385 Views
Last Modified: 2013-12-18
I need to change the combobox values when a button is clicked, I get this information from another data base.
Do you know what is the code to add or remove this values,   or another way to do it???
0
Comment
Question by:isadam_2
2 Comments
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 125 total points
ID: 9672960
You can use DBLookupe in combobox formula as list. Goto second tab of the field property and in the choices section select Use Formula.. and write the following formula

@DBLookup( "Notes":"NOCache"; "Server":"DatabasePath"; "View Name"; "Search Key"; "Column # or Field Name to extract")

And check option Refresh choices on doc refresh

~Hemanth
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9674939
Create a hidden field, computed for display, alows multiple values, named COMBOBOX_CHOICES

Change the ComboBox so it uses formula for choices, and enter COMBOBOX_CHOICES as the formula. Set it to refresh choices on document refresh.

Set the COMBOBOX_CHOICES field's formula to:
@If(@IsDocBeingLoaded; "First deafult choice" : "Second default choice" : "..." : "Last default choice"; COMBOBOX_CHOICES)

In your button, change the current value of COMBOBOX_CHOICES, then refresh the document.  The combobox will pick up the new choices that you set in the COMBOBOX_CHOCES field.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now