PC Review


Reply
Thread Tools Rate Thread

Create an import template without a primary key.

 
 
=?Utf-8?B?S2VubnkgQS4=?=
Guest
Posts: n/a
 
      12th Oct 2006
How do I create an import template without an automatic primary key created?
When I create my template to bring in a text file that is comma seperated, I
created the template and saved it, but when I click finish, the table is
created and has an auto generated ID field. Did I miss somewhere that I can
tell it not to create the autoID and save that as part of the import
template? I know if you go step by step through the process, you can tell it
not to create the ID field. I want to be able to use this template as part of
an automatic process running from within a macro. Also how do I run it from a
macro? I see there is an Action - RunCommand with the property of Import but
has no other properties to select the template I wish to use or point to a
file to import.
Thanks in advance
Kenny A.
 
Reply With Quote
 
 
 
 
Van T. Dinh
Guest
Posts: n/a
 
      12th Oct 2006
Somewhere in the Import Text Wizard dialogs (which you used to create the
Import Specification), probably the 3rd or 4th dialog box, you have the
option of getting Access to generate the PrimaryKey Field ID or not.

To automate with Macros, use the TransferText Macro action.

--
HTH
Van T. Dinh
MVP (Access)



"Kenny A." <(E-Mail Removed)> wrote in message
news60E2BD3-6260-4A21-B30D-(E-Mail Removed)...
> How do I create an import template without an automatic primary key
> created?
> When I create my template to bring in a text file that is comma seperated,
> I
> created the template and saved it, but when I click finish, the table is
> created and has an auto generated ID field. Did I miss somewhere that I
> can
> tell it not to create the autoID and save that as part of the import
> template? I know if you go step by step through the process, you can tell
> it
> not to create the ID field. I want to be able to use this template as part
> of
> an automatic process running from within a macro. Also how do I run it
> from a
> macro? I see there is an Action - RunCommand with the property of Import
> but
> has no other properties to select the template I wish to use or point to a
> file to import.
> Thanks in advance
> Kenny A.



 
Reply With Quote
 
=?Utf-8?B?S2VubnkgQS4=?=
Guest
Posts: n/a
 
      13th Oct 2006
Van,
Thanks for replying. I know (as I mentioned in my original post) in the
wizard you can turn off the option to auto gen an ID field, but that does not
seem to get saved with the template. The template saved the field names and
size, type of field, but not the option of turning off auto gen of the ID
field. If I manually import the file and select the template, yes I can walk
through rest of steps to turn off auto gen of ID field, but if this is going
to run automatically, I will not have that option. So, again I ask, how to I
turn off this option and save as part of template that will run
automatically?
Thanks
Kenny A.

"Van T. Dinh" wrote:

> Somewhere in the Import Text Wizard dialogs (which you used to create the
> Import Specification), probably the 3rd or 4th dialog box, you have the
> option of getting Access to generate the PrimaryKey Field ID or not.
>
> To automate with Macros, use the TransferText Macro action.
>
> --
> HTH
> Van T. Dinh
> MVP (Access)
>
>
>
> "Kenny A." <(E-Mail Removed)> wrote in message
> news60E2BD3-6260-4A21-B30D-(E-Mail Removed)...
> > How do I create an import template without an automatic primary key
> > created?
> > When I create my template to bring in a text file that is comma seperated,
> > I
> > created the template and saved it, but when I click finish, the table is
> > created and has an auto generated ID field. Did I miss somewhere that I
> > can
> > tell it not to create the autoID and save that as part of the import
> > template? I know if you go step by step through the process, you can tell
> > it
> > not to create the ID field. I want to be able to use this template as part
> > of
> > an automatic process running from within a macro. Also how do I run it
> > from a
> > macro? I see there is an Action - RunCommand with the property of Import
> > but
> > has no other properties to select the template I wish to use or point to a
> > file to import.
> > Thanks in advance
> > Kenny A.

>
>
>

 
Reply With Quote
 
Van T. Dinh
Guest
Posts: n/a
 
      13th Oct 2006
In the TransferText Macro or TransferText Method (VBA), you have an option
to specify the Import Specification you want to use for the import.

Check carefully Access Help (Macro) / Avvess VB Help (Method) and you will
see this option, argument.

--
HTH
Van T. Dinh
MVP (Access)



"Kenny A." <(E-Mail Removed)> wrote in message
news:B9D4AF3C-AE80-4DD2-BE23-(E-Mail Removed)...
> Van,
> Thanks for replying. I know (as I mentioned in my original post) in the
> wizard you can turn off the option to auto gen an ID field, but that does
> not
> seem to get saved with the template. The template saved the field names
> and
> size, type of field, but not the option of turning off auto gen of the ID
> field. If I manually import the file and select the template, yes I can
> walk
> through rest of steps to turn off auto gen of ID field, but if this is
> going
> to run automatically, I will not have that option. So, again I ask, how
> to I
> turn off this option and save as part of template that will run
> automatically?
> Thanks
> Kenny A.
>



 
Reply With Quote
 
=?Utf-8?B?S2VubnkgQS4=?=
Guest
Posts: n/a
 
      13th Oct 2006
Thanks Van, I will look into.
Have a nice day

"Van T. Dinh" wrote:

> In the TransferText Macro or TransferText Method (VBA), you have an option
> to specify the Import Specification you want to use for the import.
>
> Check carefully Access Help (Macro) / Avvess VB Help (Method) and you will
> see this option, argument.
>
> --
> HTH
> Van T. Dinh
> MVP (Access)
>
>
>
> "Kenny A." <(E-Mail Removed)> wrote in message
> news:B9D4AF3C-AE80-4DD2-BE23-(E-Mail Removed)...
> > Van,
> > Thanks for replying. I know (as I mentioned in my original post) in the
> > wizard you can turn off the option to auto gen an ID field, but that does
> > not
> > seem to get saved with the template. The template saved the field names
> > and
> > size, type of field, but not the option of turning off auto gen of the ID
> > field. If I manually import the file and select the template, yes I can
> > walk
> > through rest of steps to turn off auto gen of ID field, but if this is
> > going
> > to run automatically, I will not have that option. So, again I ask, how
> > to I
> > turn off this option and save as part of template that will run
> > automatically?
> > Thanks
> > Kenny A.
> >

>
>
>

 
Reply With Quote
 
Van T. Dinh
Guest
Posts: n/a
 
      13th Oct 2006
You're welcome ... Good lucks with your project ...

--
Van T. Dinh
MVP (Access)



"Kenny A." <(E-Mail Removed)> wrote in message
news:E330AF08-18F5-42BC-B1FC-(E-Mail Removed)...
> Thanks Van, I will look into.
> Have a nice day
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot create new primary partition - only 2 primary partitions on disk Vistanoob Windows Vista Performance 6 28th May 2009 05:13 PM
Creating a Template to use for Primary Students =?Utf-8?B?UmljayBQYXRlcnNvbg==?= Microsoft Word Document Management 0 5th Jul 2006 08:33 PM
How do I create a custom template and import a file to it? =?Utf-8?B?Sm9obm5pZQ==?= Microsoft Word Document Management 1 12th May 2006 10:13 PM
Create Import Template =?Utf-8?B?Q2h1Y2tX?= Microsoft Access Forms 0 5th Aug 2005 03:05 PM
Import Text Wizard Specification template, import/copy from one mdb to another? Kevin Microsoft Access Getting Started 3 9th Sep 2004 11:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:22 AM.