Solved

Alter table filed type in MSAccess.

Posted on 2011-02-16
5
292 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Email Header Detail 12 55
VBA SQL statement - 2 "OR"s and 1 "And" 4 27
Whats wrong in this query - Select * from tableA,tableA 11 31
Filter a form 8 15
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
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…

773 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