473,394 Members | 1,693 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,394 software developers and data experts.

Command to change the data type of a field in a table

Hiya,

Is it possible to create a command button on a form and code it such
that it goes to a particular field and changes the data type property
of that filed from Auto Number to Number.

Many Thanks and Kind Regards,
Hussain

Sep 1 '06 #1
3 1751
<hp********@gmail.comwrote
Is it possible to create a command
button on a form and code it such
that it goes to a particular field and
changes the data type property of that
filed from Auto Number to Number.
What you are trying to accomplish that you could not do by manually
modifying the Table in Design View?

Larry Linson
Microsoft Access MVP

Sep 1 '06 #2

Larry Linson wrote:
<hp********@gmail.comwrote
Is it possible to create a command
button on a form and code it such
that it goes to a particular field and
changes the data type property of that
filed from Auto Number to Number.

What you are trying to accomplish that you could not do by manually
modifying the Table in Design View?

Larry Linson
Microsoft Access MVP
Hiya Thanks for the reply.

No, the end user has no experience of using the access system and so
wouldn't know how to do it in design view. I want him to do everything
from a form. Also, it takes longer to do that.

Actually, if I explain you what I am trying to do, it might make it
easier for you to guide me. Basically, I have 4 tables from which I
filter data and then use append queries to use data from all four
tables and create new tables with various keys. However, to create
these new tables I have to put the data in the 4 tables and then
individually go in the design view of all four tables and change the
data type from autonumber to number because access doesnot allow the
new tables to have more than 1 autonumber filed.

Sep 4 '06 #3

Hussain wrote:
Larry Linson wrote:
<hp********@gmail.comwrote
Is it possible to create a command
button on a form and code it such
that it goes to a particular field and
changes the data type property of that
filed from Auto Number to Number.
What you are trying to accomplish that you could not do by manually
modifying the Table in Design View?

Larry Linson
Microsoft Access MVP

Hiya Thanks for the reply.

No, the end user has no experience of using the access system and so
wouldn't know how to do it in design view. I want him to do everything
from a form. Also, it takes longer to do that.

Actually, if I explain you what I am trying to do, it might make it
easier for you to guide me. Basically, I have 4 tables from which I
filter data and then use append queries to use data from all four
tables and create new tables with various keys. However, to create
these new tables I have to put the data in the 4 tables and then
individually go in the design view of all four tables and change the
data type from autonumber to number because access doesnot allow the
new tables to have more than 1 autonumber filed.
Thanks all who tried answering this question. I have found the solution
at:

http://support.microsoft.com/?kbid=210304

Many Thanks.

Sep 4 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: William Bradley | last post by:
Following is the code I am using, behind a command button, on a form to print out only the report of that particular form. ******************** Code Start ************************ Dim strDocName...
2
by: Adam | last post by:
I am importing a table from Informix into Access XP via an ODBC connection. In one of the fields, I will need it to allow 4000 characters. In Access help, it shows the data type can be changed to...
1
by: xtra | last post by:
Hi Folk I have written a module that allows you to type a bunch of commands in the immediate window, for quick access to information when you are creating VB code. Here it is, it may be helpful...
1
by: Neo | last post by:
I konw that one can make use of the default UpdateCommand in the DataAdapter to save changes back into the underlying data source. But i was wondering how one could build a custom update command &...
13
by: nyt | last post by:
I have a problem of number and text field. I got the database file(mdb) that contains many combo boxes used and its list values are created by "value list" For eg field Field name= 'furniture'...
11
by: Dixie | last post by:
How can I programatically, take some Date/Time fields present in a table in the current database and change their type to text? dixie
13
by: Bart | last post by:
Hi, i get the error: "There is already an open DataReader associated with this Command which must be closed first" Thanks Bart ----------------------------------------- Imports...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
8
by: mlwerth | last post by:
Dear Access Group: This is the most basic and most embarrassing of questions, but I cannot find where to change the data type of a text field that I have in Access 2003 to a number field. I've...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
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,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...

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.