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
315 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
[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
  • 5
  • 2
  • 2
9 Comments
 
LVL 50

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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

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
 

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 50

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

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