Solved

Alter table filed type in MSAccess.

Posted on 2011-02-16
5
294 Views
Last Modified: 2012-06-21
I have fields in an MSAccess
table that I need to change
the field type to:
inspection date: from Text to Number
inspection employee: from Binary to Number
Map: from Binary to Text

Thanks.  
0
Comment
Question by:donnie91910
  • 3
  • 2
5 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34908247
alter table [Name of table] alter column [inspection date] long, [inspection employee] long, [map] Text(255)
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 34908386
you may need to run the alter statement separately

currentdb.execute _
"alter table [Name of table] alter column [inspection date] long"
currentdb.execute _
"alter table [Name of table] alter column [inspection employee] long"
currentdb.execute _
"alter table [Name of table] alter column [map] Text(255)"
0
 

Author Comment

by:donnie91910
ID: 34908428
It gives me the error: Expected End of Statement.

Here is the code:
Private Sub Command0_Click()
alter table [MONTHLY_EXTRACT] alter column [insp_dt] long, [insp_emp] long, [mapid_xy] Text(255)
End Sub
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34908473
see my second post
0
 

Author Closing Comment

by:donnie91910
ID: 34908777
Thanks.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question