Dear all,
I would like to know if there is a way to have a combobox in an unbound form to show only the names of tables starting with numbers. eg. 88 , 89, 90, etc.
Best Regards,
Alireza355
6 8180 @Alireza355
Hey Alireza355,
Welcome.
Can you please post your code and show me what it is that you're speaking of. Since I dont' know how you're loading the Combo Box control, the answer is going to depend on the method used.
Thanks,
Joe P.
Dear PianoMan64,
I have created a database, with a lot of tables, forms and reports, etc. almost all the table names are not numberical. For example: Credit, Debit, Expenses, Codes, etc.
but some tables names are numerical. Example: 88, 89, 90, 91, etc.
I have an unbound form, asking the user to select one of the previous years, and the command button in that form does all the exchanges, table renames, calculations, updates, etc.
I just want the combobox in that form to show the names of tables which start with numbers.
Thanx a lot
This function will return a value list of tables that start with an integer. You can then use the forms "on open" or any other event to set the combobox.rowsource value. - Public Function ListTables()
-
Dim i As Integer
-
Dim s As String
-
On Error Resume Next
-
For i = 0 To CurrentDb.TableDefs.Count - 1
-
s = CurrentDb.TableDefs(i).Name
-
If Val(s) > 0 Then
-
If ListTables = "" Then
-
ListTables = s
-
Else
-
ListTables = ListTables & "; " & s
-
End If
-
End If
-
Next
-
End Function
And the code for setting the rowsource would be. - Private Sub Form_Open(Cancel As Integer)
-
ComboBoxName.RowSource = ListTables()
-
End Sub
WOW!
You are a nuclear bomb........
Thanx a loooooooooooooooooooooooooooooooooooooooooot
You're quite welcome. Good luck with your project
Don
Dear Don,
First of all, I would like to thank you again for your kind help.
My accounting project is finally finished, and working perfectly. But there is one last thing I would like to have deep knowledge on, and since you are an expert, I would like to ask you to have a look at another thread I have started on March 7th, called "Lock Records", and see if you can provide help.
Thank you very much, and with all the best wishes.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Phil |
last post by:
My form uses a dataset containing two tables, a base table
(Contact) and a lookup table (Insurer). My combobox is
bound as follows:
DataSource = datasetContact
DisplayMember =...
|
by: amber |
last post by:
Hello,
I'm using the following code to work with a combobox:
combobox1.Datasource = employeeDataset.Table(0)
combobox1.ValueMember = "STR_INITIALS"
combobox1.DisplayMember = "BOTH_NAMES"...
|
by: Jesper Denmark |
last post by:
Well I'm new to C# and I do not know of all of the
different controls yet. The grid you are referring to is
that the datagrid control, and if yes, would it be
possible to use it without a database...
|
by: PeterZ |
last post by:
G'day,
After doing much searching and pinching bits of ideas from here there and
everywhere I came up with a fairly 'clean' solution of including a comboBox
into a dataGrid column.
You can...
|
by: Anand |
last post by:
Hi All,
I have a combobox with style as DropDown List.
When I set the combobox.selectedIndex = 0, the first value is not showing up
in the combobox and it is simply blank.
Only if I...
|
by: Bill nguyen |
last post by:
Table A has 2 columns:
recID int
recName String
I need to load all recName into combobox B using B.Items.Add(recName). This
is no problem.
However, I would like to be able to match ComboxBox...
|
by: Rich |
last post by:
Hello,
I have a search application to search data in tables in a database (3 sql
server tables). I populate 2 comboboxes with with data from each table. One
combobox will contain unique...
|
by: fiaolle |
last post by:
Hi
The first set of source code is the class for a combobox in a grid,
hopefully. In the second set of code we try to use the combobox class, but
the grid is empty.
I don't understand how this...
|
by: JJGarcia |
last post by:
Hi Everyone,
I'll try to explain the process I'm following, I'm new to this so I'm
triying the easy way first, probably the lasyest too!
I created a new Project, drag in to it a SQLConnection,...
|
by: gleadams |
last post by:
I have databound a Windows form ComboBox control to a DataSource and
DataMember and it is properly showing the data as I navigate through
the records. My question concerns the choices in the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
| |