Solved

Alter table filed type in MSAccess.

Posted on 2011-02-16
5
295 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 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