If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > How to create a new colum in a table from a form

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-11-06, 18:35
agentjude agentjude is offline
Registered User
 
Join Date: Sep 2006
Posts: 4
How to create a new colum in a table from a form

Hello everyone

I'm having a hard time trying to create a new column in a table but from a form I created.
I tried this: I opened my table and added a new column, I closed it and then I open my form (which is linked to the table I'm talking about), then I go to "design view" and open my Field List and the new "column" I created doesn't come out, is not there... I know I'm doing something wrong.Please I need help.

Thanks you very much
Reply With Quote
  #2 (permalink)  
Old 09-12-06, 10:44
pkstormy pkstormy is offline
Moderator
 
Join Date: Dec 2004
Location: Madison, WI
Posts: 3,925
Is the record source for your form a query? Look at the record source of your form (click the ...) and see if the field is in that query. If it isn't, it won't show as a field list on the form. Otherwise, you might need to simply close and reopen the form in design view as sometimes it doesn't get refreshed if you have the form open and add a new field to the underlying table.
__________________
Expert Database Programming
MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)
Reply With Quote
  #3 (permalink)  
Old 09-12-06, 15:45
agentjude agentjude is offline
Registered User
 
Join Date: Sep 2006
Posts: 4
My records source is not a query, is a table. Once I create a new column in the table, I close it and then I open my form and then I go to design view and open my "field list" and I don't see the new column I just created. There is anyway to "update" the "field list" once I add new columns in my underlying table?. Thanks pkstormy..!!

Agentjude
Reply With Quote
  #4 (permalink)  
Old 09-12-06, 16:22
pkstormy pkstormy is offline
Moderator
 
Join Date: Dec 2004
Location: Madison, WI
Posts: 3,925
Perhaps if you select the table in the dropdown again as the record source. I've seen this happen where it doesn't always refresh the field list to the form and you need to re-select the table again for the record source. Usually it refreshes by simply closing and re-opening the form.
__________________
Expert Database Programming
MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)
Reply With Quote
  #5 (permalink)  
Old 09-12-06, 23:19
agentjude agentjude is offline
Registered User
 
Join Date: Sep 2006
Posts: 4
pkstormy, where is the dropdown you are talking about?, where is located?, is in the design view of the form?... thak you again.
Reply With Quote
  #6 (permalink)  
Old 09-12-06, 23:48
agentjude agentjude is offline
Registered User
 
Join Date: Sep 2006
Posts: 4
pkstormy, I went to the help online and I found out that I can update the field list by opening it and then click on the "refresh" icon, which is located in the "field list toolbar", which I can't find it... I went over all the toolbars and none of them is a "field list toolbar"... please help me find it. Than you again pkstormy..! This is the link I found: http://office.microsoft.com/en-us/as...741751033.aspx

Last edited by agentjude; 09-12-06 at 23:59.
Reply With Quote
  #7 (permalink)  
Old 09-13-06, 01:03
CyberLynx CyberLynx is offline
Stuck on my opinions...
 
Join Date: Nov 2003
Posts: 1,487
To add a column to a table you can use the ALTER TABLE SQL Statement. Something like:

Code:
CurrentDB.Execute "ALTER TABLE yourTableName ADD COLUMN newFieldName Text(75);"


Now update the database....you can use this function.

Code:
Public Sub TablesRefresh()
   ' -----------------------------------------------------------------------------
   ' Description:
   ' Refresh the Database Window and Table Definitions
   '
   ' Syntax:
   ' TablesRefresh
   '
   ' Example:
   ' =======
   ' TablesRefresh
   '
   ' RETURNS:
   ' =======
   ' None
   ' -----------------------------------------------------------------------------
   
   ' Refresh the Database Window
   Application.RefreshDatabaseWindow
   'Refresh the Table Definitions Table
   Application.CurrentDb.TableDefs.Refresh
   DoEvents
End Sub
.
__________________
Environment:
Self Taught In ALL Environments.....And It Shows!

Reply With Quote
  #8 (permalink)  
Old 09-13-06, 11:57
rguy84 rguy84 is offline
Registered User
 
Join Date: Jun 2004
Location: Seattle, WA
Posts: 601
Jude, the drop down Paul is talking about is in the properties window.
__________________
Ryan
My Blog
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On