[AccessD] Extract Field Names to Records

Chris Enright cclenright at yahoo.com
Fri Feb 22 15:57:55 CST 2008


Mark,

I believe so!

I did smile when I read Gustav's reply that contained the word "easily". Half the time with you guys I don't understand the questions let alone the answers. (Thanks Gustav, and I am still trying it).

OK ... Team Leaders are able to got to a website and manually input core times, diverted time, downtimes and resources but it is a long and tedious daily process. I found that the location was able to accept an Excel workbook and also could export it. So I exported the workbook, which has 4 w/sheets, and imported it into Access. So I have 4 tables and I can populate them and export them back to Excel to a workbook that can be uploaded.

The workbook has a fixed format. The only thing that changes is the employees. The problem is that the employees  are column headers in the workbook and therefore end up as  fields when imported to Access.

I am trying to find a piece of code that will extract the field names from the table and add them to tblNames under the one field fldNames so I can use them in a list box on a form. 

Did I make myself totally confusing .. :)

lol

Chris

----- Original Message ----
From: Mark A Matte <markamatte at hotmail.com>
To: Access Developers discussion and problem solving <accessd at databaseadvisors.com>
Sent: Friday, February 22, 2008 4:51:27 PM
Subject: Re: [AccessD] Extract Field Names to Records



Chris, 
I 
think 
I 
understand 
what 
you 
are 
asking. 
...

I 
had 
a 
db 
that 
got 
its 
data 
from 
a 
phone 
switch...unfortuantely 
the 
reports 
(all 
text 
files)had 
headers 
in 
weird 
places 
and 
were 
NOT 
formatted 
for 
import.  
I 
imprted 
the 
files 
as 
fixed 
length...wrote 
a 
few 
query 
that 
would 
seach 
for 
the 
headers 
and 
text 
that 
did 
not 
belong 
and 
delete 
these 
rows...since 
the 
report 
was 
always 
in 
the 
same 
format...the 
offending 
rows 
all 
had 
the 
offending 
data 
in 
the 
same 
columns.  
The 
data 
left 
I 
knew 
was 
good...and 
parsed 
it 
to 
the 
proper 
table.

Am 
I 
close?

Mark 
A. 
Matte

> 
Date: 
Fri, 
22 
Feb 
2008 
07:52:06 
-0800
> 
From: 
cclenright at yahoo.com
> 
To: 
accessd at databaseadvisors.com
> 
Subject: 
[AccessD] 
Extract 
Field 
Names 
to 
Records
>
> 
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
>
>
> 
____________________________________________________________________________________
> 
Be 
a 
better 
friend, 
newshound, 
and
> 
know-it-all 
with 
Yahoo! 
Mobile. 
Try 
it 
now. 
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> 
--
> 
AccessD 
mailing 
list
> 
AccessD at databaseadvisors.com
> 
http://databaseadvisors.com/mailman/listinfo/accessd
> 
Website: 
http://www.databaseadvisors.com

_________________________________________________________________
Shed 
those 
extra 
pounds 
with 
MSN 
and 
The 
Biggest 
Loser!
http://biggestloser.msn.com/
-- 
AccessD 
mailing 
list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: 
http://www.databaseadvisors.com






      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping


More information about the AccessD mailing list