Edit a Table Using VBE

  • Thread starter Thread starter Captain America
  • Start date Start date
C

Captain America

Guest
Can anyone tell me how to edit a table using VBE?
I have reasonable experience with both Access and VB, however have never used VBE.
For example, what I want to do is have a table with a number of records in a field and other fields with certain information, than have code to ammend new fields to a second table using the records in table1 as the field names.

Any help on that?
Thanx in Advance
 
Are you using this in an access environment or is it exported to an other environment
 
Are you happy to use a SQL statement CREATE TABLE ?
 
Why would you want to create a non-normalised table? It's wrong!
 
Yes im tryin to do this in access, I dont as much want to create a table but ammend fields to it. I dont know anything of SQL, but if it does what I want Im sure itll be fine.
 
Hi Captain America (..wow! Do you wear a cape?)

I'm lost. Could you explain the acronym VBE.

Thanks for your help.

Bob
 
I guess the confusion is being caused because no one understands WHY you would want to append new columns to a table and name the columns based on data in another table. It really sounds like you are back in spreadsheet land. In a relational database, data is data. It doesn't require the continued addition of columns to accomidate it.

BTW. VBA IS VB with the addition of objects depending on which application the VBA is embedded in. So if you know how to do this with VB, you would use exactly the same code to do it in VBA.
 
Yes raskew, I sometimes do wear a cape :P

VBE is Visual Basic Editor which is used to write VBA (Visual Basic for Applications) which allows you to do some things that VB alone cant. Due to new objects and such as Hartman stated.
Using VBE i can have it view and edit properties of a form, and have done previously. Though I cant figure out how to view or edit the properites of a table.
 
I suggest you answer Pat's first if you want us to be able to try to help you:

Pat Hartman said:
WHY would you want to append new columns to a table and name the columns based on data in another table

RV
 
Because when it adds the field with the title of the records of the prev table, I also want about 2 or 3 fields added after that.

So that when I add records to table 1
For each record, it will append about 3 or 4 fields to table 2, the first one with title of contents of the record and the others with a set title.

It just makes it immensly easier to add new fields to table 2
which I will be doin frequently for a while.

If this appears unnecessary, please say so
however I would still like to know how to access table properties using VBE
for future reference.
 
Access isn't Excel.
In Access, you add records to a table, not columns.

I strongly advice you to get a bit more familiar with the concept of relational databases and change your approach.

RV
 
however I would still like to know how to access table properties using VBE
The VBE is for working with code. Are you asking how to write code to examine the properties of a table? If so, search help for tabledef and collections. You should find code samples.

Generally, table properties are examined in the GUI. Open the table in design view and rightclick to get its properties.
 

Users who are viewing this thread

Back
Top Bottom