Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AddItem in Combo Box for Access 2000

Status
Not open for further replies.

tomhughes

Vendor
Aug 8, 2001
233
US
Is there any way to fill a combo box with data with script when you are using Access 2000 ? I know you can do it with Access 2002, using .AddItem , but is there some way of getting the values into a combo box in Access 2000, or do I need to get Access 2002 ???
 
Tom,

No change from Access 2000.

Regards,

Darrylle


Never argue with an idiot, he'll bring you down to his level - then beat you with experience.
 
The .AddItem and .RemoveItem methods of combos and lists were added to the 2002 version of Access, and is not available in the 2000 version.

If you know the .AddItem method you probably also know how to loop the recordset and concatenate a string of values delimited by semicolon, which you can assign to the combos rowsource.

If you use ADO, you can also use the GetString method of the recordset - something like this

[tt]With Me!cboMyCombo
.RowSourceType = "Value List"
.RowSource = rs.GetString(adclipstring, , ";", ";")
End With[/tt]

Note that the 2000 version also has a limit of 2048 characters value list rowsource, while later versions have 32 750.

Roy-Vidar
 
RoyVidar
I think I can concatenate a string of values, but I'm not sure how to assign them to the rowsource. Can you help me doing that ?
 
Tom,

Sincere apologies - I am sure that I have used the .additem method, and I'm on the latest Access version that I've ever used: 2k.

Whoops.

Regards,

Darrylle

Never argue with an idiot, he'll bring you down to his level - then beat you with experience.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top