Solved

Alter table filed type in MSAccess.

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

Expert Comment

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

Accepted Solution

by:
Rey Obrero 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 119

Expert Comment

by:Rey Obrero
ID: 34908473
see my second post
0
 

Author Closing Comment

by:donnie91910
ID: 34908777
Thanks.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now