[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

Combobox linked to database - Naming the combobox's appropriately.

Asked by ExtremeD in Microsoft Word, VB Database Programming, Databases Miscellaneous

Tags: Microsoft, Word, 2003, VB6

Hi - I hope it don't make this confussing.

I have various word documents with ActiveX combox's inside which are directly linked to a database which resides on my server.  At the moment, I'm only able to differentiate between one combox and the next by using the (Below) code.  Is it possible - I'm sure it is - to change the coding slightly so that instead of having the combox's populated by using (1), (2) etc... I could reference them by their actual name, i.e. (combox1), (combox2) etc...

Here's my code:
<Moved as a code snippet by request from the Asker>

Many thanks,
ExtremeD
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
Private Sub Document_New()
 On Error GoTo Document_New_Err
    Dim cnn As New ADODB.Connection
    Dim rst As New ADODB.Recordset
    cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
             "Data Source=\\myserver\database$\staffnames.mdb"
    rst.Open "SELECT DISTINCT [staffname1], [staffname2] FROM tblStaffnames ORDER BY [staffname1];", _
             cnn, adOpenStatic
    rst.MoveFirst
    ActiveDocument.InlineShapes(1).OLEFormat.Object.Clear
    ActiveDocument.InlineShapes(2).OLEFormat.Object.Clear
    Do
        ActiveDocument.InlineShapes(1).OLEFormat.Object.AddItem rst![staffname1].Value
        ActiveDocument.InlineShapes(2).OLEFormat.Object.AddItem rst![staffname2].Value
         rst.MoveNext
    Loop Until rst.EOF
 
Document_New_Exit:
    On Error Resume Next
    rst.Close
    cnn.Close
    Set rst = Nothing
    Set cnn = Nothing
        ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
    Exit Sub
Document_New_Err:
    MsgBox Err.Number & vbCrLf & Err.Description, vbCritical, "Error!"
    Resume Document_New_Exit
End Sub
[+][-]08/20/08 07:42 AM, ID: 22270065Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Microsoft Word, VB Database Programming, Databases Miscellaneous
Tags: Microsoft, Word, 2003, VB6
Sign Up Now!
Solution Provided By: JOrzech
Participating Experts: 1
Solution Grade: A
 
[+][-]08/20/08 07:48 AM, ID: 22270157Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/20/08 07:51 AM, ID: 22270194Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/20/08 08:03 AM, ID: 22270368Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/20/08 08:25 AM, ID: 22270658Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/24/08 02:27 PM, ID: 22302090Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/09/08 07:16 AM, ID: 22427588Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 / EE_QW_2_20070628