A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

create a combo box that gets its rows from a VB Function



 
 
Thread Tools Display Modes
  #1  
Old April 19th, 2008, 11:36 AM posted to microsoft.public.access.forms
Anil
external usenet poster
 
Posts: 23
Default create a combo box that gets its rows from a VB Function

create a combo box that gets its rows from a VB Function
  #2  
Old April 19th, 2008, 01:44 PM posted to microsoft.public.access.forms
Bob Quintal
external usenet poster
 
Posts: 939
Default create a combo box that gets its rows from a VB Function

=?Utf-8?B?QW5pbA==?= wrote in
news
create a combo box that gets its rows from a VB Function

Create the function to return a semicolon delimited list:

Public Function makeRowSource() As String
makeRowSource = """John"";""Paul"";""George"";""Peter, Paul and
Mary"""
End Function

Then create the combobox. Set the Row source type to value list.
Somewhere in the form's event code you will set
me.comboNNN.rowsource = makeRowSource

Which event you should use depends on your needs. It could be
Form_Load, On_Current, the After_Update event for some textbox or
the On_Enter event of the combobox.


--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.