Avatar billede -ulli- Nybegynder
22. maj 2002 - 14:22 Der er 7 kommentarer og
1 løsning

Makro

Hej

Hvordan laver jeg en makro der:

1) Importerer en kommasepareret fil man vælger via dialogbox
2) Bruger en Import-/eksportspecifikation der er lavet til databasen
3) Viser rapport genereret ud fra tabellen

Avatar billede -ulli- Nybegynder
22. maj 2002 - 14:33 #1
ok..

1) har jeg selv løst.. men hvordan får jeg den til automatisk at bruge en Import-/eksportspecifikation og så oprette tabellen bagefter?
Avatar billede terry Ekspert
22. maj 2002 - 15:01 #2
First I would NOT use a macro I would do it all in VBA. Make a form with a buttonto start the import.

1) Use the common dialog to select the fiel and then use the Transfertext to import the file you choose.
2) I assume you want to us ethe import spec. while importing. You can use an import spec. with Transfertext

3) Make a report using the wizard then place a button on the form again using the wizard, to open the report you just made!
Avatar billede terry Ekspert
22. maj 2002 - 15:02 #3
that was an answer1
Avatar billede -ulli- Nybegynder
22. maj 2002 - 15:23 #4
Uhmmm

How do I insert a form in the access VBA editor?

If I start it in Word I can use "Insert -> UserForm"

That possibility is not there if I start the VBA editor from Access..
Avatar billede terry Ekspert
22. maj 2002 - 15:34 #5
In Access you select thhe form TAB  from the database windows, then you choose new.

Then in design view you can select controls to put on the form from the toolbox!
Avatar billede -ulli- Nybegynder
22. maj 2002 - 15:54 #6
ah ok.. found it =)

hmmm

When I try to add Common Dialog component to select file it complains about:

"OLE-server is not registered. Reinstall OLE-server to register it"

uhmm? What's that?
Avatar billede terry Ekspert
22. maj 2002 - 17:38 #7
Not sure, I think it snecesary to have Access developer edition!
Anyway here is a link to another dialog control
http://www.mvps.org/access/api/api0001.htm

You can download and example too I think!
Avatar billede -ulli- Nybegynder
23. maj 2002 - 12:57 #8
Thanks a lot for the help :)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester