Solved

Alter table filed type in MSAccess.

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
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 …

743 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

9 Experts available now in Live!

Get 1:1 Help Now