Log in

View Full Version : Update listbox value from value in different DB



tx7399
12-15-2012, 08:47 PM
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

mrojas
12-17-2012, 07:10 AM
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