Re: Programmatically changing the field formats for a table

From: Roger Carlson (NO-carlsoro-SPAM_at_hotmail.com)
Date: 02/17/04


Date: Tue, 17 Feb 2004 14:54:54 -0500

The easiest thing to do is create your table ahead of time (either manually
or programmatically) and then Append data to that table.

If you can't do that, it can still be done, but it requires a lot of coding.
You can modify some properties of a field with SQL statements, but others
must use DAO methods. (I assume we are talking about Access tables rather
than an ODBC source like Oracle.)

On my website is a small sample database called SQLDAOLoader.mdb. Its
purpose is to allow the update of a remote database, but will work with
native tables. It has separate functions to modify each property of a
field. You store the steps in a table called UpdateSteps, which the code
runs through sequentially to modify the indicated tables.

Of course, you could hard code a function to do this, but then you would
have to do this for each table.

Take a look at my sample and see if you can figure out what it is doing.

-- 
--Roger Carlson
  www.rogersaccesslibrary.com
  Reply to: Roger dot Carlson at Spectrum-Health dot Org
"walters@mellon.com" <anonymous@discussions.microsoft.com> wrote in message
news:11e4701c3f57f$de2d5370$a401280a@phx.gbl...
> Is there a way, either through a macro, query or VB coding
> to change the formats of fields in a table that was
> created using a query.  When a make-table query is run,
> the resulting table does not keep the field formats of the
> original table.  How can I get them back?


Relevant Pages

  • Re: webbased search through catalog
    ... I've got the asp script working, but it seems to spit out results ... Modify q.catalog to specify your catalog name. ... > ' your logo is not a GIF file, or you don't want to copy it, change the ... > ' You can set the number of query results returned on a single page ...
    (microsoft.public.inetserver.indexserver)
  • Re: Changing query at runtime
    ... Thanks Joan, I already tried that, but after giving the qtemp object Read ... Design, Modify Design and even Admin permissions, I still get the "You do ... option" clause in the query. ... and give users modify permissions to the query. ...
    (microsoft.public.access.security)
  • Re: Fix transfer text automation
    ... you have to open a query based on this ... > I think the specs list is maintained in table MSysIMEXSpecs ... But I was hoping to modify the existing code. ... >>> Alex Dybenko (MVP) ...
    (microsoft.public.access.modulesdaovba)
  • Re: Albert D. Kallal -WordMerge20
    ... So I'd like the user to select the query from the ... date and the chosen WordMerge template. ... therefore DateParam (my user input form won't open). ... I'm wondering if there is a way to modify your WhatQuery form to accept user ...
    (microsoft.public.access.queries)
  • ADO update and tables with more than 127 fileds
    ... query to load recordsets, ... I noticed that for the big tables the code instead to modify ... edited record (by setting new values and then calling update) deletes the ... that this was done to circumvent the 255 field limit of the ADO update ...
    (microsoft.public.vb.database.ado)