Make table query

  • Thread starter Thread starter Razor
  • Start date Start date
R

Razor

Hi,

I'm creating some new fields in my make-table query using:

{myAlias}: Null

but when I look in the generated table, the fields'
datatype is Binary (by default).

I need the Datatype to be Text.

Is this a default setting somewhere?

If not, how can I specify the datatype for my new fields
in the query?

Thanks,

Razor
 
When you specify Null as the value, Access doesn't know what data type you
want. To make it text use empty quotes ("") instead.

Kelvin
 
Thanks, Kelvin!

Now what about creating a field with a default Number
datatype?

Thanks again,
Razor
 
Hi,

I'm creating some new fields in my make-table query using:

{myAlias}: Null

but when I look in the generated table, the fields'
datatype is Binary (by default).

I need the Datatype to be Text.

Is this a default setting somewhere?

If not, how can I specify the datatype for my new fields
in the query?

You might want to consider creating the table, empty (using the user
interface or in code) and running an Append query instead. This gives
you full control over datatypes and sizes.

In my experience MakeTable queries are rather rarely needed (given
that you can base a Form, Report, Export, or another query on a Select
Query); may I ask why you need to (apparently) routinely create new
tables?
 
John,

I need to swap some data in and out of a table according
to some translation rules.

I am trying to convert this process into a dozen queries
that will need to be run in sequence and will be numbered
1 through 12.

One of the steps is to use one table to create another
with some additional fields; then these fields are
populated. I need to ensure the datatypes of those
fields so that the user can just string these queries in
a macro and run the macro without intervention.

Does this help?

Thanks,

Razor
 
One of the steps is to use one table to create another
with some additional fields; then these fields are
populated. I need to ensure the datatypes of those
fields so that the user can just string these queries in
a macro and run the macro without intervention.

I'd still suggest pre-creating the target table - just have it sitting
there empty waiting for the set of queries to run. You can then run a
Delete query to empty the table when you're done (if you would have
deleted the table at the end of the process in your scheme).
 
Back
Top