[AccessD] Question about parsing a string intelligently

Arthur Fuller artful at rogers.com
Wed Aug 11 13:57:59 CDT 2004


An app I'm doing involves replacing paper forms with nifty software
forms. However, some of the shortcuts the users take on the paper forms,
while readily readable for humans, are a little more problematic from
the p.o.v. of Access. Here's an example. The customer wants to buy 132
units per month, to be delivered in six shipments per month. On the
paper form, the client writes this:

Amount     Material     Price     Delivery Date
132 ST/mo  SHG Slab     xxxxx     Aug 2, 5, 9, 12, 16, 19

The order in question is for the next 6 months, so the user fills in six
such rows, each of whose ultimate column contains a collection of dates
as presented above.

I would like the user to be able to enter the dates exactly as shown
above, and then magically turn them into 6 detail rows apiece. Note that
the year is not entered. In this case it's not a problem, we can assume
the current year; but suppose there were 7 rows not 6. The last row
would say something like Jan and I would have to magically comprehend
that we've passsed December so the implication is that that row applies
to 2005.

My first version of the software didn't anticipate this at all. Instead
it had a cute calendar popup thingie that allows you to select one date.
As a result, my UI sucks compared to the old paper form (in this respect
at least).

As I recall, there is some simple function that receives a
comma-delimited string and returns an array of its substrings, as it
were. But I can't remember what that function is. I could write it, and
probably have for some long-forgotten app, but IIRC it's now built into
Access. Can anyone confirm or deny this?

Something that could possibly be cool in this situation is a calendar
control that does multi-select. Does anyone know of such a beast?

There is at least one more wrinkle in this problem, located in column 1
of the example above. The notation means 132 short tons (i.e. American
tons, 2000 lb) per month. Dividing evenly, that's 22 short tons per
shipment. But the entries in this column totally depend on what the
customer is used to: alternative entries might include:

132 MT/mo -- metric (i.e. civilized) tons
22 STs/shp -- the user did the dividing
264000 lb/mo -- oddball user measures everything in pounds not tons,
short or metric :)

Okay, this message has gone on long enough. 

TIA,
Arthur

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte
Sent: Wednesday, August 11, 2004 11:22 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Import File From UNIX box


Hello All,

I thought this situation had passed.

First, Thanks for all the feedback...for the most part...the conversion
went 
fine.

The problem is the file I am converting contains a field that is 'free
text' 
and is often copied/pasted from other applications.  In the 3rd
record...in 
this field, there is a character that is interpreted as EOF...so my code

stops without an error...but only the first 2 records are imported.  Is 
there any way to test for this situation(2 EOFs or when there is data
past 
EOF)?

Thanks,

Mark A. Matte




>From: "Pedro Janssen" <pedro at plex.nl>
>Reply-To: Access Developers discussion and problem
>solving<accessd at databaseadvisors.com>
>To: "Access Developers discussion and problem 
>solving"<accessd at databaseadvisors.com>
>Subject: Re: [AccessD] Import File From UNIX box
>Date: Fri, 30 Jul 2004 23:10:22 +0200
>
>Hello Mark,
>
>i use VBA on Reflection FTP to send a unix file as an ascii file to an 
>windows box. Then it is imported with no problems in access. If you 
>want the code, let me know, i will send you this next week from my 
>work.
>
>Pedro Janssen
>
>
>
> > >From: "Mark A Matte" <markamatte at hotmail.com>
> > >Reply-To: Access Developers discussion and problem 
> > >solving<accessd at databaseadvisors.com>
> > >To: accessd at databaseadvisors.com
> > >Subject: [AccessD] Import File From UNIX box
> > >Date: Thu, 29 Jul 2004 13:48:01 +0000
> > >
> > >Hello All,
> > >
> > >I have an A97 db that imports a text file.  The text file was on a
>Windows
> > >box...but now is generated and sent to a UNIX box.  The UNIX 
> > >version of this text file has a CR or LF character after each 
> > >record...and access
>sees
> > >this as the end of the file.  Any suggestions in using vba to 
> > >convert
>this
> > >file(or those characters) back to a Windows format/
> > >
> > >Thanks,
> > >
> > >Mark A. Matte
> > >
> > >_________________________________________________________________
> > >Overwhelmed by debt? Find out how to 'Dig Yourself Out of Debt' 
> > >from
>MSN
> > >Money. http://special.msn.com/money/0407debt.armx
> > >
> > >--
> > >_______________________________________________
> > >AccessD mailing list
> > >AccessD at databaseadvisors.com 
> > >http://databaseadvisors.com/mailman/listinfo/accessd
> > >Website: http://www.databaseadvisors.com
> >
> >
> > --
> > _______________________________________________
> > AccessD mailing list
> > AccessD at databaseadvisors.com 
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> >
>
>
>--
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com 
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list