473,507 Members | 9,962 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Import table Fields definitions from another table

10 New Member
Hello! Happy Christmas/holidays to you all

I have this huge table named "Positions" with more than 160 fields of which the fields are named with non obvious abbreviations.
I have another table named "definitions" which has the column name and definition fields.

In order to help me all along my forthcoming developments, I would like to use these definitions from table "definitions" into "Positions". Of course i can manually copy each definition, one by one but there is a risk of error and also, the table "Positions" might be updated by the party which delivers it to us... so automatic might be better over the long term in this case.

What are the automatic options?
- Import once?
- Is it possible to link the description field of "Positions" with the "Definitions" table?

Thank you in advance for your input guys.
Best regards
Dec 25 '06 #1
10 4298
PEB
1,418 Recognized Expert Top Contributor
So i n the table definitions u have other fields out of those 160 in Positions?
and u want to add those fileds from definitions to Positions...

If they a large size those fields u can have a pb with Access! There can't be more than 255 fields into an Access table! And can tell u that if u have more than 220 fields u will have problems...

So i don't think as a good idea to import more fields in Positions.

So my suggestion...

Create tirth table and in this table create 3 fields:

ID_Position, ID_definition and Value

In this structure u can introduce info for each position and definition that u have!

Is this helpful?
Dec 26 '06 #2
Forest14
10 New Member
Table "positions" is made of 160 fields but there are no field definitions
I am looking to add automatically the definitions of these fields by importing them from table "defintions"
Table definitions includes the following fields:
"Field" which actually matches the "positions" table fields names.
and "definition"

THank you
Dec 26 '06 #3
PEB
1,418 Recognized Expert Top Contributor
Table "positions" is made of 160 fields but there are no field definitions
Table definitions includes the following fields:
"Field" which actually matches the "positions" table fields names.
and "definition"

THank you
What do u mean under field definition? Validation Rules, Keys, Indexes, Validation text, Size? All of those properties of each field can be considered as Field definition! So tell me what property of the field u want to update automatically?
Principally programatically can be done while the field is created! When the field is created i'll check TableDef properties in Access help for more info!
Dec 26 '06 #4
Forest14
10 New Member
I mean Field description which is displayed in the status bar when this field is selected. Sorry for misunderstanding.

I was thinking about another mean of getting to the point:
for example: a text popup showing when hovering over the field on table or form view.

thanks!!!
Dec 26 '06 #5
Killer42
8,435 Recognized Expert Expert
I mean Field description which is displayed in the status bar when this field is selected. Sorry for misunderstanding.

I was thinking about another mean of getting to the point:
for example: a text popup showing when hovering over the field on table or form view.

thanks!!!
So would you say that what you want to do is automate the process of loading a bunch of text entries from one table ("definitions") into the descriptions for the corresponding fields in the table "Positions"?

This doesn't seem as though it would be excessively difficult. I'm sure that with all the Access experts here we can work something out.
Dec 26 '06 #6
Forest14
10 New Member
Yes, that's exactly what I'm looking for!
Dec 27 '06 #7
NeoPa
32,557 Recognized Expert Moderator MVP
If it's just the Description of the field you're looking for then it can be found by referencing :
Expand|Select|Wrap|Line Numbers
  1. CurrentDb.TableDefs("TableName").Fields("FieldName").Properties("Description")
You would have to cycle through the fields (Fields can also be referenced via their number) and update each one with the next item from the Definitions table.
Dec 28 '06 #8
Killer42
8,435 Recognized Expert Expert
If it's just the Description of the field you're looking for then it can be found by referencing :
Expand|Select|Wrap|Line Numbers
  1. CurrentDb.TableDefs("TableName").Fields("FieldName").Properties("Description")
You would have to cycle through the fields (Fields can also be referenced via their number) and update each one with the next item from the Definitions table.
So NeoPa, how would I go about referring to the Description property in a field definition object? I seem to recall that I've had problems with this in the past.

As I see it, the actual process required will be quite simple. Something along these lines (just rough pseudo-code, the syntax will be all wrong)...
Expand|Select|Wrap|Line Numbers
  1. Dim fld As Field
  2. For Each fld In CurrentDb.TableDefs("Positions").Fields
  3.   Go look up fld.Name in the "Definitions" table
  4.   fld.Description = text found in "Definitions"
  5.   ' Do I need to update fld, or is that automatic?
  6. Next
  7.  
Dec 28 '06 #9
NeoPa
32,557 Recognized Expert Moderator MVP
So NeoPa, how would I go about referring to the Description property in a field definition object? I seem to recall that I've had problems with this in the past.

As I see it, the actual process required will be quite simple. Something along these lines (just rough pseudo-code, the syntax will be all wrong)...
Expand|Select|Wrap|Line Numbers
  1. Dim fld As Field
  2. For Each fld In CurrentDb.TableDefs("Positions").Fields
  3.   Go look up fld.Name in the "Definitions" table
  4.   fld.Description = text found in "Definitions"
  5.   ' Do I need to update fld, or is that automatic?
  6. Next
  7.  
That's about the size of it.
It is a property of an object (if that helps) rather than data within a record so no .Edit / .Update required.
You may need a For IntegerVar type construct instead though, as the records in the other table would be likely to be positionally dependant.

HTH -Ade.
Dec 28 '06 #10
Killer42
8,435 Recognized Expert Expert
That's about the size of it.
It is a property of an object (if that helps) rather than data within a record so no .Edit / .Update required.
You may need a For IntegerVar type construct instead though, as the records in the other table would be likely to be positionally dependant.
I'll have to await confirmation (or refutation) from the OP, but I think they are linked by the field name, which I expect would be a foreign key on Definitions table.
Dec 28 '06 #11

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

Similar topics

4
7581
by: Fiala | last post by:
Table A +--------+-----------+ | A-num | text | | 1 | | | 2 | | | 3 | | | 4 | | | 5 | | +--------+-----------+
3
2539
by: sparks | last post by:
I was copying fields from one table to another. IF the var name starts with milk I change it to egg and create it in the destination table. It works fine but I want to copy the description as...
3
2449
by: bitoulis | last post by:
Hi, is it possible to use the records of a table as the field names of another table? If yes, how is it done? Thanks in advance Laertes
0
257
by: Leonardo Gangemi | last post by:
How to align right a table based on another table created dinamically? Leonardo
2
2288
by: S0ck3t | last post by:
Please could I have some help on matching records between tables. I want to return a check (true/false) stating whether the field combination in table 1 occurs in table 2. Obviously it's easy with...
1
3027
by: Shizbart | last post by:
MS Access 97 Beginner/Moderate Level User I am trying to create a Database to track Workouts in MS Access 97. I have one Table named Workouts that contains the following Fields: Workout...
5
17660
by: joshua.nicholes | last post by:
I have an access database that consists of two tables.A data collection table and a species list table. The data collection table has about 1500 records in it and the species list has about 600....
2
1645
by: MrCrunchy | last post by:
Hi All I have 2 tables (as shown below), if i add a row to the FILES TABLE then the myid value is added to mydata list in the PLAYLISTS TABLE, based on the genre matching the myname values. Hope...
1
2516
by: Arielle | last post by:
Problem: I have a few related tables that collects information about a given publication. The information collected varies based on the type of collection and is stored in a few different tables. ...
0
7313
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
7372
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...
1
7029
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
7481
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...
1
5039
isladogs
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...
0
4702
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...
0
3190
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
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...

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.