DoCmd.TransferDatabase import "FORMS"

  • Thread starter CWH via AccessMonster.com
  • Start date
C

CWH via AccessMonster.com

I am trying to import new forms into a database using the following vb code.
Of course it doesn't work. Any help here would really be appreicated;

DoCmd.TransferDatabase acImport, "Microsoft Access", "C:\Folder\DBname.mdb",
acForm, "FrmName, frmName"


Thanks
 
C

CWH via AccessMonster.com

Thanks Pieter;

But when I change to statement as suggested I get a 2465 Error can't find the
field "|" referred to in your expression.

Pieter said:
"FrmName, frmName"
should be
FrmName, frmName

Pieter
I am trying to import new forms into a database using the following vb
code.
[quoted text clipped - 5 lines]
 
D

Douglas J. Steele

What is FrmName: a variable containing the name of the form, or are you
using that to represent the name of the field?

If it's supposed to be the actual name of the field, use

"FrmName", "frmName"

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


CWH via AccessMonster.com said:
Thanks Pieter;

But when I change to statement as suggested I get a 2465 Error can't find
the
field "|" referred to in your expression.

Pieter said:
"FrmName, frmName"
should be
FrmName, frmName

Pieter
I am trying to import new forms into a database using the following vb
code.
[quoted text clipped - 5 lines]
 
C

CWH via AccessMonster.com

Hi;

Sorry if I'm comfusing. All I want to do is import the form in its entirity
to include all fields etc..

What is FrmName: a variable containing the name of the form, or are you
using that to represent the name of the field?

If it's supposed to be the actual name of the field, use

"FrmName", "frmName"
Thanks Pieter;
[quoted text clipped - 13 lines]
 
D

Douglas J. Steele

That's fine, but you need to tell us what FrmName is in the one line of code
you provided.

Perhaps if you showed more of your code...

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


CWH via AccessMonster.com said:
Hi;

Sorry if I'm comfusing. All I want to do is import the form in its
entirity
to include all fields etc..

What is FrmName: a variable containing the name of the form, or are you
using that to represent the name of the field?

If it's supposed to be the actual name of the field, use

"FrmName", "frmName"
Thanks Pieter;
[quoted text clipped - 13 lines]
 
C

CWH via AccessMonster.com

DoCmd.TransferDatabase acImport, "Microsoft Access", "C:\Folder\DBname.mdb",
acForm, TrainingMaster, TrainingMaster

Where TrainingMaster is the actual form name. and "C:\folder\DBname.mdb" is
the location where the form is that I want to import into the current
database. My vb code deletes the current form (same name) and then should
import the new one.

Thanks


That's fine, but you need to tell us what FrmName is in the one line of code
you provided.

Perhaps if you showed more of your code...
[quoted text clipped - 14 lines]
 
D

Douglas J. Steele

In that case, you need

DoCmd.TransferDatabase acImport, "Microsoft Access", "C:\Folder\DBname.mdb",
acForm, "TrainingMaster", "TrainingMaster"

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


CWH via AccessMonster.com said:
DoCmd.TransferDatabase acImport, "Microsoft Access",
"C:\Folder\DBname.mdb",
acForm, TrainingMaster, TrainingMaster

Where TrainingMaster is the actual form name. and "C:\folder\DBname.mdb"
is
the location where the form is that I want to import into the current
database. My vb code deletes the current form (same name) and then should
import the new one.

Thanks


That's fine, but you need to tell us what FrmName is in the one line of
code
you provided.

Perhaps if you showed more of your code...
[quoted text clipped - 14 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top