hi all, :bigyello:
i want to add one elsement at o'th index of ComboBox ...
like this
"---Select---"
how can i do thisd and on which event ??
pls help me regarding this with code..
thanx in advance
Printable View
hi all, :bigyello:
i want to add one elsement at o'th index of ComboBox ...
like this
"---Select---"
how can i do thisd and on which event ??
pls help me regarding this with code..
thanx in advance
You can use
or in the properties add "Select" to the value propertyCode:Sub ComboBox1_Change()
Me.ComboBox1.Value = "----Select----"
End Sub
Are you using word?access?excel?
:) :) :)
ohh i am sorry,
i am using access and i want to add new element on 0'th index as
"--select--" and user should able to see this "--select--" before user select any thing from ComboBox
Hello,
You could also set the text property of the combobox.
Once a user selects something else the Select will be gone.
J
thanx Killazzz ,
i have try as per you say but it wount work...
thanx
Nile,
You go to your table. Click on the Design feature. Go to "combobox1" under the field properties section click on default value and input your value there.
Hi jmhfloor,
i had try the solustion which you told me, i have done this step's but no result Dude..(Click on the Design feature. Go to "combobox1" under the field properties section click on default value and input your value there)
pls help me any one...
thanx in advance,
Regards
to add element to a combobox, use the code combo1.additem "your element here"
Is your combo box bound to a table or something?
Just using combo1.additem "your element here" will add it to the end of the dropdown list.
You need to specify the index position of 0 to get it as the first item.
hi all,
yes i have one Combo Box which is retrive value from one table and i have one sub form on same form when i select records from Combo box subform will show me records according to that selecttion, when i search the property Combobox1.additem it is not there .... i am doing all this in Access as i told early thanx and pls help me regarding this ...
i am not able to find the property like combo1.additem "your element here"
thanx in advance,
Hi!!!
Click on the properties of the combo box....Locate the record source type (this should be table/query) for record source choose the table in the drop down list...
I suppose your going to use ADO/DAO code for that since your project specification requires you to select a value in the combo box and change the data in your subform...Have you tried using DAO/ADO?
:) :) :)
hay KGC,
thanx for your help,
i am new in Access i did't know about the ADO/DAO i only select DropDown From ToolsBox and place it on form it ask me to ( I want ComboBox to LookUp the Values in a table or Query ) and i link it .. that's it..
thanx,
Hi all,
pls help me......
thanx in advance,
which version of Access are you using and the term "combobox1" is a generic term I was using in place of the name of the combobox you are trying to name.
When you go to your table and go into design view. Select the name of the combobox and there will be a set of fields at the bottom of that screen find the section for Default Value. This sets the combo box to this name every time it opens. When you select a different value from your list it will change the name on the default value to your value you selected and store that information in the table for the new record.
I have attatched a generic table form to show you what I mean when this happens.
(I have access 2000 and using this exact technique.)
Hi...
I suppose you have a table named customer with a primary key of CustomerID..And in your form you added textboxes bound to the fields and the combo box for searching the customerID.The combo box is not bound to the table.The record source type should be Table/Query...Use sql statement in the record source of the combo box....
Example...
Then in your combo box named Combo8, attach this code...Quote:
Select Customer.CustomerID, Customer.CustomerName, Customer.CustomerAddress from Customer;
VB Code:
Private Sub Combo8_AfterUpdate() ' Find the record that matches the control. Dim rs As Object Set rs = Me.Recordset.Clone rs.FindFirst "[CustomerID] = " & Str(Nz(Me![Combo8], 0)) If Not rs.EOF Then Me.Bookmark = rs.Bookmark End Sub
:) :) :)