Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to import table into access?

Status
Not open for further replies.

cogivina

Programmer
Jun 3, 2003
36
US
I have a table that need to import into access. The problem is that the minus (-) sign in the amount field causing the issue. The data looks like this: #####-

A 1.20-
B 505
B 61.5-

How can I import this into Access correctly? I'd like the data field to look like this:

A -1.20
B 505
B -61.5

Thanks.
 
Import the records into a temporary table first. Use text for both fields. Then use an append query to append the temporary records into a permanent table. You can use an expression like:
Code:
Val([ImpFld]) * IIf(Instr([ImpFld],"-")>0,-1,1)

Duane
Hook'D on Access
MS Access MVP
 
Thanks for the code. Can we do it in one step because it is a big table?
 
I have a table that need to import into access. " What kind of table? Is it another Access or other table that you can link to? If so you can create the link and use the calculation in an append or make table query.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top