Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / September 2007

Tip: Looking for answers? Try searching our database.

Default Value question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David - 28 Sep 2007 02:35 GMT
Hello

I am importing data to a single table from multiple text files using a macro
and it is importing beautifully.
One piece of information is a required field but is not part of the file I
am importing.

I have a form with a combo box for the various selections that can go into
that field.

Can I have the value set to "A" for the first list I import and "B" for the
second list.

David
Ken Snell (MVP) - 28 Sep 2007 02:49 GMT
What I would do is this:

1) Import the first text file to an empty temporary table.

2) Run an append query to copy the data from the first table to the
permanent table. Include a calculated field in this query that provides the
value of "A" for all records.

3) Delete all records from the temporary table.

4) Import the second text file to the empty temporary table.

5) Run an append query to copy the data from the first table to the
permanent table. Include a calculated field in this query that provides the
value of "B" for all records.

6) Delete all records from the temporary table.

Signature

       Ken Snell
<MS ACCESS MVP>

> Hello
>
[quoted text clipped - 12 lines]
>
> David
David - 28 Sep 2007 23:28 GMT
How do I do step 2?
I haven't used append queries before and I just don't know how to include a
calculated field.

> What I would do is this:
>
[quoted text clipped - 30 lines]
> >
> > David
David - 29 Sep 2007 00:06 GMT
I got it. Thanks a Bunch!

David

> What I would do is this:
>
[quoted text clipped - 30 lines]
> >
> > David
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.