Solved

How would you define the internal field DATE TYPES for table tblTest based on the following XLS file titeld "Test.xls"

Posted on 2011-02-24
9
310 Views
Last Modified: 2012-05-11
I am developing an Access application using Access 2003 with an MDB type file.
How would you define the internal field DATE TYPES for table tblTest based on the following
XLS file titled "Test.xls" which serves as the input source?

I would use the following statement to import the Excel file into the Access table:

filenm = "U:\TEST.XLS"

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tblTest", filenm, True

For example:

When I defined all the table fields as DATA TYPE "Text", my results were as follows:

XLS file                       Access table tblTest imported to:

CORP/CMPY                CORP/CMPY
---------------               ----------------------------
0655                           655 (missing lead zero)

BALANCE SHEET       BALANCE SHEET    
G/L #                          G/L #
-------------------          --------------------------------
100-003400                no value

M&D/ISG G/L #           M&D/ISG G/L #
--------------------        -----------------------
N/A                             no value

Test.xls
0
Comment
Question by:zimmer9
  • 5
  • 2
  • 2
9 Comments
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 34975087
CORP/CMPY: Integer. Set Format to "0000"
BALANCE SHEET G/L #: String
M&D/ISG G/L #: String. Set "Allow Null values" to True

/gustav
0
 

Author Comment

by:zimmer9
ID: 34975249
How do you assign "STRING" as the DATA TYPE for a field within an internal access table?

I see DATA TYPES of:the following from within an internal Access table:

Text
Memo
Number
Date/Time
Currency
Auto Number
Yes/No
OLE Object
Hyperlink
Lookup Wizard



0
 
LVL 3

Expert Comment

by:trbaze
ID: 34975747
String is any of the above.  Typically you would use the Text or Memo.
0
 

Author Comment

by:zimmer9
ID: 34975836
What DATA TYPE do I use for the field CORP/CMPY to fix the following error in which NO VALUE is being populated into field CORP/CMPY when IMPORTING into the Access table from the XLS file :

As per XLS file:                As per table tblTest

CORP/CMPY                     CORP/CMPY  
---------------                     -----------------
5711/ 655                         no value  
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:zimmer9
ID: 34975855
In Excel, field CORP/CMPY is defined as Number   Category: Custom  
Type  ###
0
 
LVL 3

Expert Comment

by:trbaze
ID: 34975871
In access you would need to set the datatype for CORP/CMPY to TEXT.
0
 

Author Comment

by:zimmer9
ID: 34975897
When I set the CORP/CMPY field to TEXT in the Access table, I get no value for this field in the Access table for some records.
0
 

Author Comment

by:zimmer9
ID: 34976066
I did a format cells for certain rows within the CORP/CMPY field and some rows are defined as
Custom   0###  (for ex:  0555)      other rows are defined as
Custom     ###  (for ex:  1534)     and still other rows are defined as
General            (for ex:   PPF)
0
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 34978184
> String is any of the above.

No.

> Typically you would use the Text or Memo.

No. You would use the Text or Memo.
Text is limited to 255 characters. Memo can hold much larger strings but is non-indexable.

/gustav
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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

707 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

14 Experts available now in Live!

Get 1:1 Help Now