473,387 Members | 3,684 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Dynamic generation on Combobox values

2
I am trying to have the last 12 months to always be the option in the dropdown for a combo box. (Basically a combobox, with dynamic options)

I am using Access 2000.

What is the function and syntax in visual basic to edit a combobox? I can do all the dynamic month generation, but I do not know how to edit a combobox from VB.

Thank you.
Feb 7 '07 #1
3 3195
Rabbit
12,516 Expert Mod 8TB
If you're talking about the list for a combo box then it's Me.ComboBoxName.RecordSource
Feb 7 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
I am trying to have the last 12 months to always be the option in the dropdown for a combo box. (Basically a combobox, with dynamic options)

I am using Access 2000.

What is the function and syntax in visual basic to edit a combobox? I can do all the dynamic month generation, but I do not know how to edit a combobox from VB.

Thank you.
The code is ...

Expand|Select|Wrap|Line Numbers
  1. Me.ComboBoxName.RowSourceType = "Table/Query"
  2. Me.ComboBoxName.RowSource = "SELECT ...."
  3. Me.ComboBoxName.Requery
Or

Expand|Select|Wrap|Line Numbers
  1. Me.ComboBoxName.RowSourceType = "Value List"
  2. Me.ComboBoxName.RowSource = value1;value2;...etc.
  3. Me.ComboBoxName.Requery
Triggering this code could be done on the Form Load event if no action on the form is going to affect it. If it's on the form load event you won't need the requery.

Mary
Feb 8 '07 #3
fedya
2
Thats it thanks.
Feb 8 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Martin Mrazek | last post by:
Hi, I have a HTML form and need to generate the action-string (what to do after submission) from values of textfields in the form. It means something like <form method="post"...
1
by: Stephen.Hunter | last post by:
Hello Everybody (anybody)? I am trying to appent a combobox to include data entered by a user which is Not In List. I have came accross this code from Allen Browne which seems to be what I am...
5
by: Markus Broy | last post by:
Hello everybody, I have a problem concerning the dynamic creation of a CustomValidator. If I create a CustomControl as shown in the code below and the page is post back the validation...
1
by: Kevin Hodgson | last post by:
I have a DataBound ComboBox, which has a text value as the Value property, and the UniqueID for that value is bound to the Combobox.Tag property. When a user makes a new selection in the...
1
by: Thomas Qvist | last post by:
We are building a suite of programs consisting of both winforms applications and office addins. We would like to pre-generate the xml-serialization classes and add it to our project to avoid...
6
by: R2d2Rabeau | last post by:
Hi, I have a comboBox that controls a datagridview. I would like to know how I can make the values displayed in the combobox unique (distinct)? Thank you for your help,
1
by: The.Daryl.Lu | last post by:
Hi, two parts to my problem if someone can help address either one or both: 1. I want to SELECT everything in the table if it matches the criteria when the query button is pressed (this is just...
0
by: J. Cliff Dyer | last post by:
On Thu, 2008-05-08 at 10:33 -0500, Victor Subervi wrote: Why are you dynamically creating getpic20.py? Obviously, in the real script, you probably have several of them: getpic1.py, getpic2.py,...
14
by: Mark | last post by:
I have a table with a field that uses a combobox to populate values. The Lookup tab within table design mode is the following: Display Control Combo Box Row Source Type ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.