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

Dynamically Renaming Fields?

Is there any way to setup a make-table query so that it names the
fields of the new table based on values in a different table.

For example, I have the following fields: Noun, Adjective, Modi 1 Name,
Mod 2 Name, Mod 1 Val, and Mod 2 Val. Listed under these fields are
the records of the table and the value of each field.
Noun | Adjective | Mod 1 Name | Mod 2 Name|Mod 1 Val|Mod 2 Val|
-------|------------|------------|-----------|---------|---------|
<name> |<adjective> | Value | Power | 255 | 65W |
<name2>|<adjective2>| Tolerance | Package | 5% | 0603 |
-------|------------|------------|-----------|---------|---------|

Is there a way to use a make-table query to make a new table that
automatically names the fields based on a value in a table?

The new tables made from a make-table query:

New Table 1:

Noun | Adjective | Value | Power |
-------|--------------|--------|-------|
<name> | <adjective> | 255 | 65W |
----------------------------------------

New Table 2:

Noun | Adjective | Tolerance | Package |
-------|--------------|-----------|---------|
<name> | <adjective> | 5% | 0603 |
---------------------------------------------

Nov 13 '05 #1
1 1615
Certainly, simply create "calculated fields" in the Select Query that you
convert to MakeTable. For example, if I have a table with fields of RowID,
Room, Chair1, and Chair2, and want a new table with Row, Place, Person1, and
Person2, then in the Query grid, I'd have the following:

Row | Place: Room | Person1:Chair1 | Person2:Chair2

and if you look at SQL View, you'll see

SELECT tblMadeANew1.RowID AS Row, tblMadeANew1.Room AS Place,
tblMadeANew1.Chair1 AS Person1, tblMadeANew1.Chair2 AS Person2 INTO
tblMakeANew3
FROM tblMadeANew1;

Larry Linson
Microsoft Access MVP
"Kosio" <aa********@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Is there any way to setup a make-table query so that it names the
fields of the new table based on values in a different table.

For example, I have the following fields: Noun, Adjective, Modi 1 Name,
Mod 2 Name, Mod 1 Val, and Mod 2 Val. Listed under these fields are
the records of the table and the value of each field.
Noun | Adjective | Mod 1 Name | Mod 2 Name|Mod 1 Val|Mod 2 Val|
-------|------------|------------|-----------|---------|---------|
<name> |<adjective> | Value | Power | 255 | 65W |
<name2>|<adjective2>| Tolerance | Package | 5% | 0603 |
-------|------------|------------|-----------|---------|---------|

Is there a way to use a make-table query to make a new table that
automatically names the fields based on a value in a table?

The new tables made from a make-table query:

New Table 1:

Noun | Adjective | Value | Power |
-------|--------------|--------|-------|
<name> | <adjective> | 255 | 65W |
----------------------------------------

New Table 2:

Noun | Adjective | Tolerance | Package |
-------|--------------|-----------|---------|
<name> | <adjective> | 5% | 0603 |
---------------------------------------------

Nov 13 '05 #2

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

Similar topics

4
by: EmmettPower | last post by:
Hi, I have a form which includes a field 'number'. When 'number' is changed additional fields ('item_0', etc) are generated on the form using 'onchange'. I want to validate the form using...
1
by: Don Leverton | last post by:
Hi Folks, I have been given a CD with approx 130 .xls files (bean-counters!) that I would like to import and merge to ONE table (tblTradeshow). The XL files are *similarly*, but not...
0
by: Nadav | last post by:
Hi, I am using the unmanaged reflection API ( e.g. IMetaDataImport, IMetaDataEmit, … ) and I wonder…. I couldn’t find a way renaming a Field/Method name… How could I do that? Concerning...
4
by: Stone Chen | last post by:
Hello, I have form that uses javascript createElement to add additional input fields to it. However, my validating script will not process new input fields because it can only find the named...
5
by: stellstarin | last post by:
I have a html where fields are created and added dynamically on the client side. I use the AppendChild() call to create fields dynamically. On submit i try to get the value for all the...
8
by: BillCo | last post by:
I'm updating a legacy app with table naming that makes baby jesus cry. It's a bit of a spider web though... no telling when and where the tables will be called by name. So I wrote this for renaming...
1
by: adamredwards | last post by:
I have a page with some form elements that are dynamically generated. They are inserted into the dom by first cloning a node, changing the values like name, and then inserted with insertBefore(). ...
0
by: lianaent | last post by:
Hi All, I'm brand new to asp.net 2.0, and have a simple task of just creating a quick and dirty data entry form with SQL Server 2005 on the back end. I added a gridview to my form, and I can...
12
by: filia&sofia | last post by:
For example I would like to dynamically allocate memory for linked list (or complex struct etc.) that has not maximum number of elements. All that I can remember is that I have to have allocated...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
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$) { } ...
0
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...
0
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
0
BarryA
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...
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...

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.