If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
clear combo data on add- [comboboxname].ItemData(n) not working
I am trying to clear the previous combo box data data on a form when adding -
this is the statement I am using in the form's default value for the field [comboboxname].ItemData(0) - The first record in each combo box is a blank. Why is this not working? |
#2
|
|||
|
|||
clear combo data on add- [comboboxname].ItemData(n) not working
I'm assuming that the form is a data bound form and the combo box is also
data bound? "DianaH" wrote: I am trying to clear the previous combo box data data on a form when adding - this is the statement I am using in the form's default value for the field [comboboxname].ItemData(0) - The first record in each combo box is a blank. Why is this not working? |
#3
|
|||
|
|||
clear combo data on add- [comboboxname].ItemData(n) not working
Try adding this code on the current event.
Private Sub Form_Current() If Me.NewRecord Then ' a new record Me.Combo0.DefaultValue = Me.Combo0.ItemData(0) End If End Sub "DianaH" wrote: I am trying to clear the previous combo box data data on a form when adding - this is the statement I am using in the form's default value for the field [comboboxname].ItemData(0) - The first record in each combo box is a blank. Why is this not working? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I save an access document in word document? | cmartin | General Discussion | 2 | September 13th, 2005 11:26 PM |
Format on data to import to Access tables? (I need your advice) | Niklas Östergren | General Discussion | 5 | December 13th, 2004 02:54 PM |
How do I get 3 series in sync with the x-axis? | zizbird | Charts and Charting | 10 | October 25th, 2004 01:23 PM |
combo box with query as data source | Simon Wong | Using Forms | 2 | October 14th, 2004 10:13 AM |
Is this possible with Excel Chart? | q582gmzhi | Charts and Charting | 1 | September 8th, 2004 03:33 AM |