flip a table format

S

sm1

Hi,

I am looking for a solution where I could change the table in a different
format. Any office product solution, Excel or Access or any other tool could
be used where the process can be automated (macro, SQL query, etc)

I have this table:
T1 App1, App2, App3
T2 App4, App5
T3 App6, App7, App8

I want to create this table of the previous table:
App1 T1
App2 T1
App3 T1
App4 T2
App5 T2
App6 T3
App7 T3
App8 T3


Thank you for any help
 
A

Allen Browne

I would be very surprised if MS had updated JET's DDL to support this
property.

However, you can set the property in DAO. The example below creates a table,
with a memo field, and sets its TextFormat property to rich text.

Function CreateRichTextField()
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Dim prp As DAO.Property

'Create the table with a memo field
Set db = CurrentDb()
Set tdf = db.CreateTableDef("_TestRichText")
Set fld = tdf.CreateField("NotesRichText", dbMemo)
tdf.Fields.Append fld
db.TableDefs.Append tdf

'Set the property of the field
Set prp = fld.CreateProperty("TextFormat", dbByte, _
CByte(acTextFormatHTMLRichText))
fld.Properties.Append prp

'Clean up
Set prp = Nothing
Set fld = Nothing
Set tdf = Nothing
Set db = Nothing
RefreshDatabaseWindow
End Function
 
A

Allen Browne

Allen Browne said:
I would be very surprised if MS had updated JET's DDL to support this
property.

Oops: That answer was for a different question
 
B

Bill Mosca

Are those values in the original table or field names? If they are values,
can you post the field names?

If I understand correctly, you should be able to flip them with a union
query as the source for an insert query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top