View Full Version : Solved: show table field names
ViolettePhan
06-28-2006, 04:10 PM
Hi all, Is there a way to show table field name in a list box in form...?
geekgirlau
06-28-2006, 04:34 PM
Hi Violette,
Can you give us more information on what you're trying to do?
ViolettePhan
06-28-2006, 08:28 PM
Hi Geekgirlau,
My task is to build an import form in which user can find a file location (done) on excel file. after then pick an excel file, the cell heads are display in a list box (called lstSource). Because the excel file not always have same columns as my existing tables, so user need to map it with an existing table headers (Called lstDestination) corresponding. after they map those columns, it will import data in my existing table and ignore those un map columns... (If anyone use MS Outlook or Lotus Approach application, there is a build-in import form that user can map their columns before they hit import button. My requirement is similar to that.
I don't know how to do it yet, so I start out step by step... my first step is read the existing tble headers first. And I just figure out how to put it in a list rowsource. Now my next step is I will read the excel column headers, and put in list box... After that I will see how to map it....
Thanks for reply. If you or anyone have experience about this please give me some advice...
Best,
Violette
Violette, I have got that code working on your form on Command Button (Command32). It takes the table field names and pus them in the Combo (Combo33). The code for Excel I have added to the "On Click" event procedure of your "Get Source" button. It takes the Excel Column Titles in Row 1 and places them in the new combo Box (Combo35) that I have added under the "selFileName" field. Have fun playing with it.
ViolettePhan
06-29-2006, 08:04 AM
Hi OBP,
Thanksssss, I will take a look at it. and will let you know.
Last night when I got home, I figure out how to put the table headers to list box...
Appreciate your help!!!
Violette
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.