copy current record to new record in another table

F

FooYC

i am designing a form (based on table A) that can copy the current record to
another table B. Can anyone help me, your help is much appreciated
 
A

Alex Dybenko

Best - is to use Append query - just make a new query, set type to append,
then define what and where you want to copy. You can run it from your form
using docmd.openquery
 
F

FooYC

thanks for the help. but i suspected there is something wrong with the office
i'm using. whenever i tried to use the line "dim ABC as Database" there is an
error message that pop up. can you tell me what is wrong with the line? i got
this line from the example given by access 2000. your help is very much
appreciated.
 
A

Alex Dybenko

open any module, then go to menu tools-references and add reference to DAO
3.6 if it is no listed there.
also move this reference above of ADO
 
D

David C. Holley

What is the error message?
thanks for the help. but i suspected there is something wrong with the office
i'm using. whenever i tried to use the line "dim ABC as Database" there is an
error message that pop up. can you tell me what is wrong with the line? i got
this line from the example given by access 2000. your help is very much
appreciated.

:
 
F

FooYC

Is it because of the absence of the module that causes that problem? The
error message is "Compile error: User-defined type not defined." So, how can
i get this module? Thanks for all the hard work you've done.
 
F

FooYC

The error message is "Compile error: User-defined type not defined." Can you
give me any suggestion because i haven't use access for a very long time, and
i forgot most of it. If it is possible, i want to avoid using DAO; because
the very last time i use access, which was seven years ago, the tutor only
teached me the very fundamental basics of access, even excluding vb. Please
help me and thanks in advance.
 
A

Alex Dybenko

it is because absence of reference. once you add reference - it will start
working
so once you see:

dim ABC as Database

go to menu tools-references and add reference to DAO 3.6 if it is no listed
there.
also move this reference above of ADO
 
F

FooYC

Thanks a bunch Alex for helping me out of this mess. Now the command button
is working perfectly. Thanks again for the good work!!!

Foo
 
Top