David
David

Reputation: 2251

Copying a form programatically using vba in ms-access

I want to programatically copy a form called 'fsubTemplate' to another form called 'fsubInstance' within the same database. I have a good reason for doing this. Is this possible? I'm using ms-access 2007.

Upvotes: 2

Views: 8047

Answers (1)

HansUp
HansUp

Reputation: 97101

Use the DoCmd.CopyObject Method.

DoCmd.CopyObject , "fsubInstance", acForm, "fsubTemplate"

I didn't supply a value for the first argument, DestinationDatabase, so the destination of the copy will be the current database.

Upvotes: 4

Related Questions