Hi
I use Access2000 and am trying to count the number of columns in a
table in VBA
Does anyone know if this possible?
thanks
KC 2 7262
"KayC" <ka******@yahoo .co.ukwrote in message
<11************ **********@b28g 2000cwb.googleg roups.com>:
Hi
I use Access2000 and am trying to count the number of columns in a
table in VBA
Does anyone know if this possible?
thanks
KC
If you have opened a recordset based on the table, you can use
msgbox rs.fields.count
Without, you can do something like this with a DAO tabledefs object
msgbox currentdb.table defs("tablename ").fields.c ount
Or with ADO, you could do
msgbox _
currentproject. connection.exec ute("tablename" ,,adcmdtable).f ields.count
--
Roy-Vidar
Hi
Thanks for the help, I was thrown a bit as when I used
redim strTitles(rs.fi elds.count-1) the value gave me the total rows
instead of total columns
but when I took out the rs.fields.count of the array re dimension the
numbers rec'ed
Strange one
Regards
KC
RoyVidar wrote:
"KayC" <ka******@yahoo .co.ukwrote in message
<11************ **********@b28g 2000cwb.googleg roups.com>:
Hi
I use Access2000 and am trying to count the number of columns in a
table in VBA
Does anyone know if this possible?
thanks
KC
If you have opened a recordset based on the table, you can use
msgbox rs.fields.count
Without, you can do something like this with a DAO tabledefs object
msgbox currentdb.table defs("tablename ").fields.c ount
Or with ADO, you could do
msgbox _
currentproject. connection.exec ute("tablename" ,,adcmdtable).f ields.count
--
Roy-Vidar
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: toedipper |
last post by:
Hello,
I am designing a table of vehicle types, nothing special, just a list of
unique vehicle types such as truck, lorry, bike, motor bike, plane, tractor
etc etc
For the table design I am proposing a single column table with a field name
called vehicle_type and this will contain the vehicle type.
Sot it will be
|
by: Vladimir |
last post by:
Hello,
I have a table in MS Access database. It has one field (with BYTE datatype)
that has several properties set in Lookup tab of table Design View.
Display Control = Combo Box. Row Source Type = Value List. Row Source = "1;
"Above"; 2; "Below"; 3; "Equal"".
When I try to SELECT <field> FROM <table> in my C++ application through ADO,
I...
|
by: clivegisworkuk |
last post by:
I am running this on a Pocket PC NOT on a PC.
I want to select a row of data, then insert the row of data
from tableA into tableB. Is this possible???
Any assistance would be appreciated as I have got stuck!!!
Cheers
Clive
Private Sub Test_Click()
|
by: Joe |
last post by:
Hi All,
I am new to using the Access DB and I need some help if someone
is able to give it to me. What I want to do is get the names of
the columns of certain tables. Not the data in the table but the
table column names.
I've seen other posts that suggest using the SQL command DESCRIBE
but I can't get it to work for some reason. Other...
|
by: PeteCresswell |
last post by:
I've got something called "Reference Rates".
The idea is that on a given day, we have various rates of return for
various entities.
e.g. Libor 3-month return, Libor 6-month return, US Treasury Bonds, the
Prime rate, and so-forth.
We associate a security with one of those rates.
There are a set of rates for each calendar day, and the...
| |
by: rszebras |
last post by:
I inherited a database (as a novice at Access) and need to modify it to
make it more efficient, i.e., the assignment form needs to autopopulate
with the client's name, address, phone number, etc., when you select
the cust id. Found this cited as a good method:
http://www.mvps.org/access/forms/frm0058.htm
I have two tables (clients,...
|
by: hjohnson |
last post by:
Within the access environment, I have a table that I'd like to
-add a column
-place the record number of each record into that column
The autonumber is not working for me because I am importing a .txt file into access using a specification file. The table is created at this time. When these steps are performed by hand access prompts you...
|
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 Table/Query
Row Source SELECT .LastName, .FirstName, .EmployeeNumber FROM ;
Bound Column 3
Column Count 3...
|
by: Clare CAVS |
last post by:
I have a table with a lookup column referring to another table .
tblRooms has two fields, (Autonumber), and . The column I want to display is the RoomName column. If I have Bound Column = 1, and Column Count = 2, Column Widths 0cm;3cm I get the display I want.
However, if I change the Bound Column to 2, this changes the values displayed...
|
by: jrod11 |
last post by:
hi,
I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums there are, it crashes.
There are currently 6 columns, and I only want 4. How do I remove the last two (discount and date)?
Here is a link:...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |