Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Location
    Plymouth, UK
    Posts
    59

    Unanswered: Merging fields??

    I have got a customer table, which contains information on the customer, e.g. name address etc. Then a second table has a list of our current customers which links to the 1st table and shows an account number when relevent, then their is a third table which has a list of all Agency Client, i.e. clients who advertise with us via an advertising agency, this again needs to be shown alongside the customer information, however, I need these to show in the same field as the account number, but so far I haven been able to merge the data correctly, as it either removes all the account number and leaves the field blank or vice versa, except for having a seperate field for both on a report which is very messy, I am at a loss!!

    Any help!!

  2. #2
    Join Date
    Nov 2003
    Location
    LONDON
    Posts
    238

    Re: Merging fields??

    Originally posted by Davekingwcp
    I have got a customer table, which contains information on the customer, e.g. name address etc. Then a second table has a list of our current customers which links to the 1st table and shows an account number when relevent, then their is a third table which has a list of all Agency Client, i.e. clients who advertise with us via an advertising agency, this again needs to be shown alongside the customer information, however, I need these to show in the same field as the account number, but so far I haven been able to merge the data correctly, as it either removes all the account number and leaves the field blank or vice versa, except for having a seperate field for both on a report which is very messy, I am at a loss!!

    Any help!!
    I assume your query is correct and returning all the data you require. you can create a field in your query which adds the 2 fields together. The SQL would typically look like:

    SELECT CStr([Account Num]) & ": " & [Client Name] AS [AccountNumClientName] FROM MyTable

    The command Cstr turns a number into a string (assuming the account number is a number and not alphanumeric). When merging 2 fields together they should generally be of the same data type so you have to convert them if they are not.

Posting Permissions

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