Hi,
This is my first time using a forum, so here goes...
I have an Access app that is in use by several people who know nothing about PC's. I included a few extra columns in each table to store new data elements as needed (the DB is split, so when I write new reports, I can just ship the front end DB).
Unfortunately, I have now tried to create a new field in a form to use a spare number column and found a problem.... The spare number columns have a field size of 'Long Integer', so when I try to use them to store a decimal - the value gets rounded.
I don't want to have to go to every user, making updates to each back end DB in turn, so: How can I can the 'Field Size' property of a table in a linked DB, using VB in the front end DB, in such a way that a user could execute it (like putting the VB behind a button, for example)????
Any help is gratefully received.... but I'm new to this Access stuff, so please assume I don't know what I'm doing!
G
1 4451
Hi,
This is my first time using a forum, so here goes...
I have an Access app that is in use by several people who know nothing about PC's. I included a few extra columns in each table to store new data elements as needed (the DB is split, so when I write new reports, I can just ship the front end DB).
Unfortunately, I have now tried to create a new field in a form to use a spare number column and found a problem.... The spare number columns have a field size of 'Long Integer', so when I try to use them to store a decimal - the value gets rounded.
I don't want to have to go to every user, making updates to each back end DB in turn, so: How can I can the 'Field Size' property of a table in a linked DB, using VB in the front end DB, in such a way that a user could execute it (like putting the VB behind a button, for example)????
Any help is gratefully received.... but I'm new to this Access stuff, so please assume I don't know what I'm doing!
G
This one was very tricky since you cannot modify the Properties of a Linked Table Field from within the Current Database. I did, however, solve it and the solution is listed below. I am a little short on explanations because I'm kind of tired right now, but if you need any clarification, let me know and I'll get back to you tomorrow. Good luck. - Dim strDB As String, MySQL As String
-
-
Dim appAccess As Access.Application
-
-
'Path to External Database
-
Const strConPathToExtDB = "C:\Test\Testlink.mdb"
-
-
'Create new instance of Microsoft Access.
-
Set appAccess = CreateObject("Access.Application")
-
-
'Open database in Microsoft Access window.
-
appAccess.OpenCurrentDatabase strConPathToExtDB
-
-
'tblTopics - Table containing the Field (Long_Integer) to modify
-
'after executing the SQL Statement, Long_Integer is now a SINGLE Data Type
-
MySQL = "ALTER TABLE tblTopics ALTER COLUMN Long_Integer SINGLE;"
-
appAccess.DoCmd.RunSQL MySQL
-
-
appAccess.CloseCurrentDatabase
-
Set appAccess = Nothing
NOTE: Substitute your own Path, Table, and Field Name.
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
by: Old Timer |
last post by:
I wish to type in a number in my "Code" field, for instance 1060, I
then wish the number 1060 to trigger an event that will fill in the
next field (township field) For instance, 1060 brings up and...
|
by: Tor Inge Rislaa |
last post by:
How to change row height in a DataGrid
I have DataGrid that is filled with data from a table in a DataSet. The
content of the cells is text of more than one line (as a note field). What I...
|
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'...
|
by: Ecohouse |
last post by:
I have a main form with two subforms. The first subform has the child
link to the main form identity key.
subform1 - Master Field: SK
Child Field: TrainingMasterSK
The second subform has a...
|
by: questionit |
last post by:
If we have 2 tables, which are linked to each other
And i want to change property of a field in one of the tables i.e Max Character Length, etc
how would i do it - becasue Ms Access doesn't us...
|
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...
|
by: agarwasa2008 |
last post by:
Hi,
I have a linked table called tbltest and some bounded forms (which
add, update, delete records) that were created using that linked
table. For some necessary reasons I had to create another...
|
by: gavy7210 |
last post by:
hello
i am using struts 1.2,Eclipse Platform Version: 3.4.2,mySql 5.0.1,jdk 1.5..
i have a login form(jsp) in which a user logs in,in case he doesnt enter his username and/or password an error...
|
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: 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...
|
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...
|
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: 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: 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...
|
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...
| |