Anyone knows macro for MS access?

Discussion in 'Non Technical' started by erichns, Aug 25, 2004.

  1. erichns

    erichns S15

    Here's the problem. I got this one field that need to be separated into a few field to query properly.

    This is that field :

    10/100-115 ET42

    10 means 10 holes
    100 means pcd = 100
    115 means pcd = 115
    ET42 means 42 offset

    Yes, it's for wheels measurement. The manufacturer gives the company specs this way and will keep doing it like that. So rather than manually entering the pcd, holes and offset, there has to be a way to macro them into their separate field.

    Can anybody please help me? I know there's quite a number of wizards here.
     
  2. NoMoreZed

    NoMoreZed New Member

    Some help...

    Howdy,

    I would create the extra fields in a table then do an UPDATE query and do a Mid on the original value splitting the data into the new fields.
    eg:

    Mid([originaldatafield],x,y)

    Where x is the starting position of the data for that field and y is the number of characters.
    So for the example:
    holes = Mid([originaldatafield],1,2)
    pcd1 = Mid([originaldatafield],4,3)
    pcd2 = Mid([originaldatafield],8,3)
    offset = Mid([originaldatafield],14,2)


    Baff.
     

Share This Page