By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,045 Members | 1,760 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,045 IT Pros & Developers. It's quick & easy.

report lay-out & reading data from txt-file

P: n/a
allrite folks, got some questions here...

1) LAY-OUT OF REPORTS
How is it possible to fundamentaly change the lay-out/form of a report in
access? I dont really know it that "difficult", but listen up;

Reports, the way I look at them, all present data downwards, in this way;

TITLE
data
data
SUBTITLE
data
data
SUB-SUBTITLE
data
data

is it possible to present the data "sideways", like this;

TITLE data data data data
SUBTITLE data data data data
S.S.TITLE data data data data

e.g. for making week-schedules and stuff??
2) READING DATA FROM A TXT FILE
Know this better in delphi... What component do I use if I want to load a
txt file into my app? How do I open a txt file and display it in the
component? How to read the text line by line, reading ONE character at a
time, and all the RIGHT$/LEFT$/MID$ functions would also come in handy
here...

Thanks !

Magnus,
Norway
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Magnus" wrote
1) LAY-OUT OF REPORTS . . . Reports, the way I look at them,
all present data downwards . . .
is it possible to present the data "sideways", like this;

TITLE data data data data
SUBTITLE data data data data
S.S.TITLE data data data data
It depends on the data. If it is suitable, a CrossTab Query in Access 2000
or earlier, can be used as the RecordSource of a Report. In Access 2002 and
later, you can take a look at Pivot Table view -- that may be even easier or
better for you.
2) READING DATA FROM A TXT FILE
Know this better in delphi... What component
do I use if I want to load a txt file into my app?
How do I open a txt file and display it in the
component? How to read the text line by line,
reading ONE character at a time, and all the
RIGHT$/LEFT$/MID$ functions would also
come in handy here...


A text box control will work nicely for displaying text. Some basic FileI/O
statements you can look up in Help are Open, Input #, Line Input, Close...
these are for reading text. But you will actually read the data into a
variable.

There are other modes of reading that might work if you really need to
_read_ a character at a time. You can work your way through the data,
though, a character at a time, easily enough with VBA code.

There's also the FileSystemObject for handling files. My tests using it for
text files didn't show any advantage over the "old way" and lots of System
Administrators disable it as a security measure. If your SA does not, and
you prefer to work with objects instead of plain old code, that might be of
interest.

A newsgroup response really doesn't work well as a "tutorial" on a subject
this broad, though. I have an example database of random access file I/O
that you can download from
http://accdevel.tripod.com/downloads...accessdemo.zip. Unfortunately,
that deals with files of records, rather than just sequential text files, so
probably won't be any help to you. That is a different approach, and uses
different statements.

Larry Linson
Microsoft Access MVP
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.