Ask a Question related to Microsoft Access, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. strings and numbers
      Hi, Please, tell me is it a bug or it works properly: We have Perl code: use WIN32::API; my...
    2. 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...
    3. 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...
    4. [PHP] strings
      * Thus wrote Anthony Ritter (tony@gonefishingguideservice.com): hm.. I sort of misunderstood, preg_replace isn't what you need. use preg_match...
    5. [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...
  3. #2

    Default 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

  4. #3

    Default 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

  5. #4

    Default Re: strings

    Mark Goland wrote:
    >
    > 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;
    > }
    Hi Mark.

    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

  6. #5

    Default 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

    > Mark Goland wrote:
    > >
    > > 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;
    > > }
    >
    > Hi Mark.
    >
    > 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
    >
    >
    >
    > --
    > 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

  7. #6

    Default Re: strings

    Mark Goland wrote:
    > 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 ??
    Click "File|Save As...", and select "CSV[comma-delimited](*.csv)" in the "Save
    as type" drop-down menu.

    Joseph

    R. Joseph Newton Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139