User Profile

Collapse

Profile Sidebar

Collapse
HRGED
HRGED
Last Activity: Feb 27 '15, 11:52 AM
Joined: Dec 11 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • HRGED
    replied to How can I construct a variable column name?
    Sorry for the delay in replying. I didn't know columns could be referred to postionally instead of by column name. I'll give that a try and let you know.
    Thanks for all your time, knowledge, and, especially, patience.
    See more | Go to post

    Leave a comment:


  • HRGED
    replied to How can I construct a variable column name?
    I've attached an Excel spreadsheet with example rows from my tables.
    There are 3 transactions and 3 Cod rows. Transactions Field3 has the same value as COD Field2 so there is a one to one relationship.
    The columns UTC17 to UTC26 in the Transactions rows were blank but I have populated them with the correct entries from COD.
    Cust contains just one row, there is a one to many relationship with COD on CustCd.

    Hopefully...
    See more | Go to post

    Leave a comment:


  • HRGED
    replied to How can I construct a variable column name?
    I was big iron (well, medium sized) in the days of the Commadore 64.
    What we are trying to do is to undo good database design.
    In the original database each transaction row has up to 30 Cod rows with the same transaction ID.
    Lets say each transaction represents the purchase of an item (the legendary widget).
    The customer asks us to collect certain information with each purchase and each customer has different pieces of...
    See more | Go to post

    Leave a comment:


  • HRGED
    replied to How can I construct a variable column name?
    My introduction to the hallowed principles of 'the key, the whole key, and nothing but the key' was around 1980 and I certainly wouldn't design tables like this given a free hand.
    The application is a data transform which takes table extracts from a 'real database' (I can't access it directly for security reasins), imports them and converts them to
    an horrendous multi-record format text file of which this transaction table is but one...
    See more | Go to post

    Leave a comment:


  • HRGED
    replied to How can I construct a variable column name?
    I have a transaction table and need to update each row with up to 10 values from another table (COD) containing up to 30 possible values (columns Cod1 to Cod30) . The 2 tables have a one to one relationship. The problem is that the selection of the 10 columns from the 30 availble varies from client to client. I have another table (Cust) which has one row per client with 10 columns,(UTC17 to UTC26) one for each of the columns in the transaction table...
    See more | Go to post

    Leave a comment:


  • HRGED
    started a topic How can I construct a variable column name?

    How can I construct a variable column name?

    Access2007 VBA
    I currently have the following code:
    Code:
     If Cust!UTC17 = "1" Then
            U17 = Cod!Cod1
        Else
        If Cust!UTC17 = "2" Then
            U17 = Cod!Cod2
        Else
    etc. etc
    Is there any way I can reduce it to something like
    Code:
     U17 = "Cod!Cod" & Cust!UTC17
    Cust!UTC17 contains a number
    Cod contains multiple columns named...
    See more | Go to post
No activity results to display
Show More
Working...