Tecnologia, programação e muito Visual FoxPro.

segunda-feira, 31 de maio de 2010

Re: [Access VBA Central] Indirect Reference Table update?

 

Yes you can dynamically add columns to a table and then add the data to those columns but its a two step process from what I can remember.  The first step is working with the table definition aspects and then the second part is dealing with the table content aspect.  How it is done in Access (or if its allowed -- can't recall been a while since I used Access in this manner) I can not tell you but if you look up how to work with "table definitions" that should give you the how to add tables and columns to tables and more.  Good luck.

--- On Fri, 5/21/10, jsivanan <jsivanan@yahoo.com> wrote:

From: jsivanan <jsivanan@yahoo.com>
Subject: [Access VBA Central] Indirect Reference Table update?
To: AccessVBACentral@yahoogroups.com
Date: Friday, May 21, 2010, 2:42 PM

 

If I have a tableA with columns table_name, column_name , column_value
can I read tableA and use it to add the data items specified in the columns of tableA?

For instance:
table_name col1_name col1_value col2_name col2_value
Employee emp_name Joe Smith birthdate 1/1/50
Employee emp_name Steve Jones birthdate 3/10/53
Transaction Tdate 3/1/2010 Tamount 35.00
Transaction Tdate 3/1/2010 Tamount 25.00

1) The program would open the table specified in the table_name
(That's the easy part since you can open a table specified by a string)
2) Then append a row to the table with the col1_value assigned to
the column specified in col1_name and the col2_value assigned to the column specified in col2_name?

Normally you know the column_names when you write the program and
code:
Table!Column = Value

But can you update a column not knowing it in advance? I.e. can you dynamically compose an sql insert statement and execute it in access?

Thanks,
Jnana

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.


Get great advice about dogs and cats. Visit the Dog & Cat Answers Center.


Hobbies & Activities Zone: Find others who share your passions! Explore new interests.

.

__,_._,___

Nenhum comentário:

Arquivo do blog