?
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
Medium Priority
?
316 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 51

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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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 51

Accepted Solution

by:
Gustav Brock earned 2000 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

770 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