Consulting

Results 1 to 2 of 2

Thread: Update listbox value from value in different DB

  1. #1
    VBAX Regular
    Joined
    Apr 2012
    Posts
    32
    Location

    Update listbox value from value in different DB

    Hi everyone,

    Newbie here; in over my head.
    On the form open event, I would like to update the value in a list box for each record. The list box to be updated is named "lstTerminal". The source of the data comes from another Access DB named "AGENCY INFORMATION" and the table name is also "AGENCY INFORMATION". The data needed is in field "TERMINAL AGENCY" and the value is either yes or no. Each DB has a primary key field named "ORI". One additional problem is that the "ORI" field in the source DB is format with "TX" followed by seven digits but in the target DB it is formatted with only seven digits. I need to strip off the letters "TX" from the source to make them match.

    Any help would be greatly appreciated

  2. #2
    VBAX Contributor
    Joined
    Oct 2011
    Location
    Concord, California
    Posts
    101
    Location
    I would start by attaching the source table to the target DB. Then run a query that creates a temporary table. In the process of creating the temporary table, strip the undesired characters using the Left() function.
    In your target DB, have the list control's source be the temporary table.

    Milton

Posting Permissions

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