Skip to Content
author's profile photo Former Member
Former Member

ComboBox Set Value?

Hi all!

==============

Source coding

==============

oRecordSet.DoQuery "Select Code, TreeType, PriceList, Qauntity, ToWH From OITT Where Code = '" & oCode & " '"

a = oRecordSet.Fields(0).Value '//Code

b = oRecordSet.Fields(1).Value '//TreeType

c = oRecordSet.Fields(2).Value '//PriceList

d = oRecordSet.Fields(3).Value '//Qauntity

e = oRecordSet.Fields(4).Value '//ToWH

Set oEditText1 = oForm.Items("4").Specific '//Code

Set oEditText2 = oForm.Items("7").Specific '//Qauntity

Set oCombobox1 = oForm.Items("9").Specific '//ToWH

Set oCombobox2 = oForm.Items("13").Specific '//TreeType

Set oCombobox3 = oForm.Items("15").Specific '//PriceList

oEditText1.Value = a '//Code

oEditText2.Value = d '//Qauntity

oCombobox1 = ?

oCombobox2 = ?

oCombobox3 = ?

-


already there is setted each comboboxs.

After the query is maded each cell(item) should be setted.

How can I set a value of each combobox cell ?

Thank you for your help.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 21, 2005 at 09:42 AM

    The select method of a combobox lets you set the current value for it.

    oCombobox1.Select x, psk_ByValue
    
    The second parameter has the following options
    psk_ByValue        Locates by item value.
    psk_ByDescription  Locates by item description.
    psk_Index          Locates by item index.
    

    John

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.