User Profile

Collapse

Profile Sidebar

Collapse
Medwar19
Medwar19
Last Activity: Mar 9 '11, 06:54 PM
Joined: Aug 7 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Medwar19
    started a topic Regular Expressions: Named groups in VBA

    Regular Expressions: Named groups in VBA

    Hi,

    Is it possible to used named groups in VBAs version of Regular Expressions (Regexp)

    Example match groups for extracting dates from strings:

    (?:(\d{2})\.(\d {2})\.(\d{4})\s (\d{2}):(\d{2}) :(\d{2}))|(?:(\ d{4})-(\d{2})-(\d{2})\s(\d{2} ):(\d{2})

    will returns DD.MM.YYYY or YYYY-MM-DD in submatch groups but the ordering is mixed up depending on the formatting.

    A better solution...
    See more | Go to post

  • So it turns out that the symbolic languages are passed to VBA correctly, they just show up as ? marks in the strings and watch window. Running the code through VBA I found the correct symbols are passed back out to the table.

    Result!
    See more | Go to post

    Leave a comment:


  • Recordset charset option for displaying Chinese correctly

    Hi All,

    I have localized data in 9 languages in my Access 2010 tables, and all strings display correctly formatted in Access tables and queries.

    I need to use the strings to lookup strings in other tables but when I open a DAO recordset in VBA the characters (for symbolic languages such as Greek/Chinese) do not pass through correctly (characters appears as ? marks).

    This means I can not use the strings......
    See more | Go to post

  • OK thanks. Single parameter table it is.

    I'd thought I should get the db setup and working in Access before considering SQL just because of the extra learning curve. I also use a lot of VBA for string parsing and environment setup (tables, linking, formating) so need to think about how all that will happen in SQL.

    Thanks again for your help. I'm real close not to something workable.

    Mark.
    See more | Go to post

    Leave a comment:


  • Hey SmileyOne,

    Funny you should ask!

    Each line in the log file has date, time, event code and a number of parameters (dependent on the specific code) linked together with descriptive plain text in localized language.
    Lines go beyond the 255 text data type, up to 350 chars so I have to use memo data type.

    I realized I needed to get into a more efficient format so during the initial log import I parse...
    See more | Go to post

    Leave a comment:


  • OK great!

    Thanks for all the replies. I indexed the error codes tonight which didn't seem to make much difference. Will look into your other suggestions over the weekend.

    Thanks again, really appreciate your time to reply.

    Mark.
    See more | Go to post

    Leave a comment:


  • Hey SmileyOne,

    It's actually 12GB of raw data.
    Each piece of equipment writes 1-2MB of data to a log file each day. Each line of the log file contain date,time, event, codes, additional metrics. Some of the files go back several years so it quickly adds up.

    One of the queries locates 1 of ~300 possible event codes, parses data from the log string and collates statistics for causes over all records. Not sure if...
    See more | Go to post

    Leave a comment:


  • Hey Delerna,

    Thanks for the tips. I'd thought SQL Server had to run on a server OS. I'll install the express edition on my PC and see what happens with the dbs in SQL.

    Thanks,

    Mark.
    See more | Go to post

    Leave a comment:


  • Whats the maximum sensible size for an Access application?

    Hi All,

    I developed a nice little database for analysis of equipment log files.

    The project proved very useful and people started sending me more and more data.

    It turned out I ran up against the 2GB limit quickly so I split the db and started a db for each piece of equipment using a front end db with linked table. Life was good.

    Currently I have 12GB of data in linked tables and queries...
    See more | Go to post

  • So I figured out how to do this myself:

    Code:
    Public Sub CreateDatabase(Optional InstID As String)
       'References: Microsoft Access 11.0 Object Library, Microsoft DAO 3.6 Object Library
       'Set references by Clicking Tools and Then References in the Code View window
    Dim db As DAO.Database
    Dim td As DAO.TableDef
    Dim fl As DAO.Field
    Dim pr1 As DAO.Property
    Dim FieldStr(), FieldType(), FieldWidth() As
    ...
    See more | Go to post

    Leave a comment:


  • Medwar19
    replied to Search table records by date range
    take a look at the dateadd function to query the date range.
    See more | Go to post

    Leave a comment:


  • Access Table ColumnWidth property sometimes works...?

    Hi all,

    I'm creating my Access tables using VBA and SQL.

    Code:
    strSQL = "CREATE TABLE [<tblname>] (<fieldname> AUTOINCREMENT)
    Code:
    docmd.runsql strSQL
    I then want set each fields columnwidth property using:

    Code:
    db.TableDefs(<tblname>).Fields(<fldname>).Properties("ColumnWidth") = <width in twips>
    However I get a "property not found...
    See more | Go to post

  • Hi all,

    So I did figure out how to solve this problem:

    Code:
    SELECT defTable.Name
    FROM defTable, Cust
    WHERE (((Cust.Details) Like "*" & [defTable].[Name] & "*"))
    ORDER BY Cust.ID;
    Thanks for the hints. I got there.

    Mark.
    See more | Go to post
    Last edited by NeoPa; Aug 9 '10, 02:43 PM. Reason: Please use the [CODE] tags provided

    Leave a comment:


  • Hey there,

    Not sure I understand? I related the tables 1:many and tried entering a query with criteria instr(1,Name,De tails) but Details is type memo so the join fails...

    Thanks,

    Mark
    See more | Go to post

    Leave a comment:


  • Medwar19
    started a topic Using definitions table for lookup in records

    Using definitions table for lookup in records

    Hi all,

    Am struggling here with how to use records in one table to lookup matches in another table records.

    Table1 contains the lookup terms and is called 'defTable' which has a Field 'Name' and records:

    Cat
    Dog
    Fish
    Pony

    Table2 is called 'custTable' which has a Field 'Details' and records:

    MrsSmithhasaCat whosenameistabb y
    johnthoughhisFi shwassick...
    See more | Go to post

  • Hi ADezii,

    First of all THANKS!!!!

    Exactly what I was trying to do. Excellent layout to your answer, I really learned a lot with this problem and really
    appreciate your reply.

    I got caught up trying to solve it with expression builder but with your example found writing directly in VBA and SQL is much more flexible.

    All the best,

    Mark
    See more | Go to post

    Leave a comment:


  • String search expression with wildcards for calculated field

    Hi all,

    I have a table with Field1 containing strings. Within each string is an error code that I need to extract for use in Field2 in the same table.

    i.e.

    Field1

    the err 000 111 222 333 444 occurred at 12:56:00 jan 05

    Field2

    000 111 222 333 444

    There position of the code in the string is random and I need to pattern match the format as other...
    See more | Go to post
No activity results to display
Show More
Working...