Ask a Question related to Microsoft Access, Design and Development.
-
James Brown #1
Re: strings
Sabeel,
You might like to look into the Right and InStr VBA commands. If you put a
little routine in the OnCurrent event of the form, you can get the value
from the field, parse it through a short few lines of code and put it into a
text box to display to the user.
Regards,
Jamie.
"mk sabeel" <mk_sabeel@yahoo.co.in> wrote in message
news:054e01c34c69$9e603c90$a001280a@phx.gbl...> hello sir
>
> i have a text file which i have linked and the text file
> is made as a table
> the table has one feild which has different type of records
>
> there is one record with space
> horizontal_size=704
> vertical_size=408
>
> i want to in a feild of a form the value as 704x408i
>
> and this form will be a new record whose contents will be
> added to 4 tables i.e the form has feilds from 4 tables
>
> how do i get 704x408i
>
> waiting for a stimulating response
> thank u
> sabeel
> [email]mk_sabeel@yahoo.co.in[/email]
James Brown Guest
-
strings and numbers
Hi, Please, tell me is it a bug or it works properly: We have Perl code: use WIN32::API; my... -
Extracting strings delimited by other strings
Hi, I need to write some code that will allowed embedded, specially formatted comments to document test cases within a program (SAS code). The... -
Little problem about strings...
Hi, I try to set a string "string" to "STRING", I can do it with ASCII code of each caracter, but it's not a good solution... Do you know a... -
[PHP] strings
* Thus wrote Anthony Ritter (tony@gonefishingguideservice.com): hm.. I sort of misunderstood, preg_replace isn't what you need. use preg_match... -
[PHP] replacing everything between 2 strings
That doesn't really help much... I think you just replied to the wrong post. That answer really doesn't have anything to do with my question, I... -
Mark Goland #2
strings
Hi All,
I have a tring which contains 60 to 80 keywords, I need to know what position a keyword is in. I need an efficint way to extra position of key words, here is how I am currently finding positions,
$string="type,model,color,date";
# this is how I am currently getting position, which is nto very efficiant
@keys=split ",",$string;
foreach( @keys ){
$position++;
last if m/model/ig;
}
Mark Goland Guest
-
Toby Stuart #3
RE: strings
> -----Original Message-----
> From: Mark Goland [mailto:mgoland@optonline.net]
> Sent: Friday, February 13, 2004 1:28 PM
> To: [email]beginners@perl.org[/email]
> Subject: strings
>
>
> Hi All,
>
> I have a tring which contains 60 to 80 keywords, I need to
> know what position a keyword is in. I need an efficint way to
> extra position of key words, here is how I am currently
> finding positions,
>
> $string="type,model,color,date";
>
> # this is how I am currently getting position, which is nto
> very efficiant
> @keys=split ",",$string;
> foreach( @keys ){
> $position++;
> last if m/model/ig;
> }
>
>
use strict;
use warnings;
my $str = "The cat sat on the mat";
print index($str, "sat"); # prints 8
Toby Stuart Guest
-
Rob Dixon #4
Re: strings
Mark Goland wrote:
Hi Mark.>
> I have a tring which contains 60 to 80 keywords, I need to know what position a
> keyword is in. I need an efficint way to extra position of key words, here is
> how I am currently finding positions,
>
> $string="type,model,color,date";
>
> # this is how I am currently getting position, which is nto very efficiant
> @keys=split ",",$string;
> foreach( @keys ){
> $position++;
> last if m/model/ig;
> }
If you build a hash where the keywords are the keys and their positions are
the values then you can just do a simple hash lookup:
use strict;
use warnings;
my $string = "type,model,color,date";
my @keys = split /,/, $string;
my %position;
@position{@keys} = 1 .. @keys;
print $position{'model'};
It's important that your hash is static though, it's going to be a lot slower
to rebuild it each time you need it.
HTH,
Rob
Rob Dixon Guest
-
Mark Goland #5
Re: strings
Rob,
Thanks, this is a very clever solution. I will merge be murging files
[ excel spread sheets saved in csv ], first line of files display's fileds.
All files have same fields, but in different orders. Doe's anyone know of a
way I can automate converssions of excel files to csv ??
Mark
----- Original Message -----
From: "Rob Dixon" <rob@dixon.port995.com>
To: <beginners@perl.org>
Sent: Friday, February 13, 2004 7:26 AM
Subject: Re: strings
position a> Mark Goland wrote:> >
> > I have a tring which contains 60 to 80 keywords, I need to know whathere is> > keyword is in. I need an efficint way to extra position of key words,efficiant> > how I am currently finding positions,
> >
> > $string="type,model,color,date";
> >
> > # this is how I am currently getting position, which is nto veryare>> > @keys=split ",",$string;
> > foreach( @keys ){
> > $position++;
> > last if m/model/ig;
> > }
> Hi Mark.
>
> If you build a hash where the keywords are the keys and their positionsslower> the values then you can just do a simple hash lookup:
>
> use strict;
> use warnings;
>
> my $string = "type,model,color,date";
>
> my @keys = split /,/, $string;
>
> my %position;
> @position{@keys} = 1 .. @keys;
>
> print $position{'model'};
>
> It's important that your hash is static though, it's going to be a lot> to rebuild it each time you need it.
>
> HTH,
>
> Rob
>
>
>
> --
> To unsubscribe, e-mail: [email]beginners-unsubscribe@perl.org[/email]
> For additional commands, e-mail: [email]beginners-help@perl.org[/email]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>
Mark Goland Guest
-
R. Joseph Newton #6
Re: strings
Mark Goland wrote:
Click "File|Save As...", and select "CSV[comma-delimited](*.csv)" in the "Save> Rob,
> Thanks, this is a very clever solution. I will merge be murging files
> [ excel spread sheets saved in csv ], first line of files display's fileds.
> All files have same fields, but in different orders. Doe's anyone know of a
> way I can automate converssions of excel files to csv ??
as type" drop-down menu.
Joseph
R. Joseph Newton Guest



Reply With Quote

