Gustav Brock
Gustav at cactus.dk
Fri Feb 22 11:33:55 CST 2008
Hi Chris Oh, I see now from Mark what it is about ... But again, link the WorkSheet and open a recordset. Now field names are: For n = 4 To rst.Fields.Count -1 ' build string for ListBox If n > 4 Then strFields = strFields & ";" EndIf strFields = strFields & Chr(34) & rst.Fields(n).Name & Chr(34) Next /gustav >>> Gustav at cactus.dk 22-02-2008 17:08 >>> Hi Chris Not quite sure if I understand your flow, but why not just link (attach) the WorkSheet (or Named Range) in Access? Then the Excel data appears as a normal table and you can easily fill your ListBox. /gustav >>> cclenright at yahoo.com 22-02-2008 16:52 >>> Hi, I wonder if someone would kindly help me do this? We record employees hours on some system somewhere on the corporate web and we upload it as an Excel Workbook. All the pre-work is done back here in Access 2003 and exported to the workbook. The problem is that if staff changes are made with the present system it requires the changes to be made at both ends and I am trying to automate it to stop errors. For example, the table below is an example of one of the sheets imported back from the web and I want to extract the employee names that are currently fields and put them into a table as records so they can be used in a list box. (If all the fields were turned to records I would just delete the first four so I only had names). Field Name Data Type RowType Text IDWwCoreTask Text CoreTaskName Text Type Text Anstey_Simon Number Buckland_David Number Britton_Pam Number Chaney_Catharine Number Davis_Steph Number Etc. etc. Number I am sure the solution is somewhere in the archives but I have spent days searching them and Google but must be asking the wrong question. Many thanks Chris