Programatically fill a combobox A2K ?? 
Author Message
 Programatically fill a combobox A2K ??

in VB you can use this for a list box

lstLocal.AddItem ("Text Here")
lstLocal.AddItem ("Text Here2")

is there a way to do this with VBA??

thanks
James



Sun, 28 Dec 2003 05:29:16 GMT  
 Programatically fill a combobox A2K ??
James,

Access XP is the first version of Access to include an AddItem method for
listboxes.  In prior versions of Access, you have several alternate options:

1.  If you are binding the rowsource to a table or query, add the desired
item as a new record in the underlying table or use a union with a dummy
table (one field, one record like the Oracle "dual" table), substituting the
text you want for the actual value in the table.
2.  If you're using a value list, concatenate the value onto the list as
exposed through the RowSource property.
3.  Use a callback function for the RowSourceType property, as described at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2...
l/acproRowSourceTypeFunctionParameters.asp.

HTH,
Nicole


Quote:
> in VB you can use this for a list box

> lstLocal.AddItem ("Text Here")
> lstLocal.AddItem ("Text Here2")

> is there a way to do this with VBA??

> thanks
> James



Sun, 28 Dec 2003 08:14:39 GMT  
 Programatically fill a combobox A2K ??
Hi Nicole, how about one more option:

4. FieldList.zip is a database containing the FieldList control Access
uses in its Table Analyzer and Performance Analyzer Wizards. This
control is created directly from the ACCWIZ.DLL so no ActiveX
registration problems are incurred. ACCWIZ.DLL is automatically
installed with all full installs of Access. ACCWIZ.DLL is only required
if you wish to insert a new control in Design View or want to be able to
see the Type library in the Object Browser. So for Runtime only
installs, you do not require ACCWIZ.DLL.

This is a VB like ListBox with:
1) CheckBoxes for each row
2) True Drag and Drop
3) Conditional Formatting for each Row
4) AddItem method
http://www.lebans.com/vb_listbox.htm

Just my $.02

Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


Quote:
> James,

> Access XP is the first version of Access to include an AddItem method
for
> listboxes.  In prior versions of Access, you have several alternate
options:

> 1.  If you are binding the rowsource to a table or query, add the
desired
> item as a new record in the underlying table or use a union with a
dummy
> table (one field, one record like the Oracle "dual" table),
substituting the
> text you want for the actual value in the table.
> 2.  If you're using a value list, concatenate the value onto the list
as
> exposed through the RowSource property.
> 3.  Use a callback function for the RowSourceType property, as
described at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2...

- Show quoted text -

Quote:
> l/acproRowSourceTypeFunctionParameters.asp.

> HTH,
> Nicole



> > in VB you can use this for a list box

> > lstLocal.AddItem ("Text Here")
> > lstLocal.AddItem ("Text Here2")

> > is there a way to do this with VBA??

> > thanks
> > James



Sun, 28 Dec 2003 10:17:48 GMT  
 Programatically fill a combobox A2K ??
Actually, if accwiz.dll is not on the machine, the control will not work.
And it is not redistributable.

A BETTER option is to use the original fieldlist control, the OCX. It *is*
redistributable and even has a Smart Access article documenting its use from
Mike Gilbert before he went over to the dark side....

--
MichKa

the only book on internationalization in VB at
http://www.i18nWithVB.com/


Quote:
> Hi Nicole, how about one more option:

> 4. FieldList.zip is a database containing the FieldList control Access
> uses in its Table Analyzer and Performance Analyzer Wizards. This
> control is created directly from the ACCWIZ.DLL so no ActiveX
> registration problems are incurred. ACCWIZ.DLL is automatically
> installed with all full installs of Access. ACCWIZ.DLL is only required
> if you wish to insert a new control in Design View or want to be able to
> see the Type library in the Object Browser. So for Runtime only
> installs, you do not require ACCWIZ.DLL.

> This is a VB like ListBox with:
> 1) CheckBoxes for each row
> 2) True Drag and Drop
> 3) Conditional Formatting for each Row
> 4) AddItem method
> http://www.lebans.com/vb_listbox.htm

> Just my $.02

> Stephen Lebans
> http://www.lebans.com
> Access Code, Tips and Tricks
> Please respond only to the newsgroups so everyone can benefit.



> > James,

> > Access XP is the first version of Access to include an AddItem method
> for
> > listboxes.  In prior versions of Access, you have several alternate
> options:

> > 1.  If you are binding the rowsource to a table or query, add the
> desired
> > item as a new record in the underlying table or use a union with a
> dummy
> > table (one field, one record like the Oracle "dual" table),
> substituting the
> > text you want for the actual value in the table.
> > 2.  If you're using a value list, concatenate the value onto the list
> as
> > exposed through the RowSource property.
> > 3.  Use a callback function for the RowSourceType property, as
> described at

> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000
> /htm
> > l/acproRowSourceTypeFunctionParameters.asp.

> > HTH,
> > Nicole



> > > in VB you can use this for a list box

> > > lstLocal.AddItem ("Text Here")
> > > lstLocal.AddItem ("Text Here2")

> > > is there a way to do this with VBA??

> > > thanks
> > > James



Sun, 28 Dec 2003 10:21:28 GMT  
 Programatically fill a combobox A2K ??
thanks all


Sun, 28 Dec 2003 10:24:29 GMT  
 Programatically fill a combobox A2K ??
hey,

i was looking at you site, i converted ReportUtilities to A2k, yeah, didnt
like that.

you know what to replace this line with in A2k?

Private WithEvents mSectionDetail As Access._SectionInReport



Sun, 28 Dec 2003 10:34:15 GMT  
 Programatically fill a combobox A2K ??

btw, its the reference to the mde that cant be converted.  Got code? or can upsize for me?

thanks

james



Sun, 28 Dec 2003 10:38:36 GMT  
 Programatically fill a combobox A2K ??
You cannot reference a prior version MDE, sorry.

--
MichKa

the only book on internationalization in VB at
http://www.i18nWithVB.com/



btw, its the reference to the mde that cant be converted.  Got code? or can
upsize for me?

thanks

james



Sun, 28 Dec 2003 10:44:05 GMT  
 Programatically fill a combobox A2K ??
Stephen,

Well, if we're going outside the Access listbox control, why not just go
ahead and use a ListView? <g>

Nicole


Quote:
> Hi Nicole, how about one more option:

> 4. FieldList.zip is a database containing the FieldList control Access
> uses in its Table Analyzer and Performance Analyzer Wizards. This
> control is created directly from the ACCWIZ.DLL so no ActiveX
> registration problems are incurred. ACCWIZ.DLL is automatically
> installed with all full installs of Access. ACCWIZ.DLL is only required
> if you wish to insert a new control in Design View or want to be able to
> see the Type library in the Object Browser. So for Runtime only
> installs, you do not require ACCWIZ.DLL.

> This is a VB like ListBox with:
> 1) CheckBoxes for each row
> 2) True Drag and Drop
> 3) Conditional Formatting for each Row
> 4) AddItem method
> http://www.lebans.com/vb_listbox.htm

> Just my $.02

> Stephen Lebans
> http://www.lebans.com
> Access Code, Tips and Tricks
> Please respond only to the newsgroups so everyone can benefit.



> > James,

> > Access XP is the first version of Access to include an AddItem method
> for
> > listboxes.  In prior versions of Access, you have several alternate
> options:

> > 1.  If you are binding the rowsource to a table or query, add the
> desired
> > item as a new record in the underlying table or use a union with a
> dummy
> > table (one field, one record like the Oracle "dual" table),
> substituting the
> > text you want for the actual value in the table.
> > 2.  If you're using a value list, concatenate the value onto the list
> as
> > exposed through the RowSource property.
> > 3.  Use a callback function for the RowSourceType property, as
> described at

> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000
> /htm
> > l/acproRowSourceTypeFunctionParameters.asp.

> > HTH,
> > Nicole



> > > in VB you can use this for a list box

> > > lstLocal.AddItem ("Text Here")
> > > lstLocal.AddItem ("Text Here2")

> > > is there a way to do this with VBA??

> > > thanks
> > > James



Sun, 28 Dec 2003 10:45:17 GMT  
 Programatically fill a combobox A2K ??
Because no subclassing is required for the FieldList control I consider
it a native Access control Nicole. I do plan on converting a VB API
Listview over to Access this summer though.
:-)

Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


Quote:
> Stephen,

> Well, if we're going outside the Access listbox control, why not just
go
> ahead and use a ListView? <g>

> Nicole



> > Hi Nicole, how about one more option:

> > 4. FieldList.zip is a database containing the FieldList control
Access
> > uses in its Table Analyzer and Performance Analyzer Wizards. This
> > control is created directly from the ACCWIZ.DLL so no ActiveX
> > registration problems are incurred. ACCWIZ.DLL is automatically
> > installed with all full installs of Access. ACCWIZ.DLL is only
required
> > if you wish to insert a new control in Design View or want to be
able to
> > see the Type library in the Object Browser. So for Runtime only
> > installs, you do not require ACCWIZ.DLL.

> > This is a VB like ListBox with:
> > 1) CheckBoxes for each row
> > 2) True Drag and Drop
> > 3) Conditional Formatting for each Row
> > 4) AddItem method
> > http://www.lebans.com/vb_listbox.htm

> > Just my $.02

> > Stephen Lebans
> > http://www.lebans.com
> > Access Code, Tips and Tricks
> > Please respond only to the newsgroups so everyone can benefit.



> > > James,

> > > Access XP is the first version of Access to include an AddItem
method
> > for
> > > listboxes.  In prior versions of Access, you have several
alternate
> > options:

> > > 1.  If you are binding the rowsource to a table or query, add the
> > desired
> > > item as a new record in the underlying table or use a union with a
> > dummy
> > > table (one field, one record like the Oracle "dual" table),
> > substituting the
> > > text you want for the actual value in the table.
> > > 2.  If you're using a value list, concatenate the value onto the
list
> > as
> > > exposed through the RowSource property.
> > > 3.  Use a callback function for the RowSourceType property, as
> > described at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000

- Show quoted text -

Quote:
> > /htm
> > > l/acproRowSourceTypeFunctionParameters.asp.

> > > HTH,
> > > Nicole



> > > > in VB you can use this for a list box

> > > > lstLocal.AddItem ("Text Here")
> > > > lstLocal.AddItem ("Text Here2")

> > > > is there a way to do this with VBA??

> > > > thanks
> > > > James



Sun, 28 Dec 2003 12:42:51 GMT  
 Programatically fill a combobox A2K ??
James how about using the A2K version instead of trying to convert the
A97 version. It's the first entry at the top of the page.

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.



Quote:
> hey,

> i was looking at you site, i converted ReportUtilities to A2k, yeah,
didnt
> like that.

> you know what to replace this line with in A2k?

> Private WithEvents mSectionDetail As Access._SectionInReport



Sun, 28 Dec 2003 12:45:07 GMT  
 
 [ 25 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Filling a Secondary Combobox based on information from a primary combobox

2. Programatically filling out a web form

3. MSHFlexGrid filled out with DataEnvironment programatically.

4. Problem with A2K vs A2K runtime

5. Programatically open a dropdown combobox

6. Combobox Dropdown - Programatically Initiate ?

7. Combobox Dropdown - Programatically Initiate ?

8. declaring a combobox programatically

9. Using the pipe symbol to fill a listbox or combobox

10. ComboBox Custom Fill Functions

11. fill combobox with contents directory

12. Reference ComboBox item to fill ListBox

 

 
Powered by phpBB® Forum Software