Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set data type in make-table query 1

Status
Not open for further replies.

StayAtHomeMom

Technical User
Sep 6, 2003
41
US
Hello,
I have a make-table query, with fields for that new table chosen from 2 different queries. I want to add a "blank" field to the new table, that isn't derived from either of the other queries. The values will be null to begin with, and manipulated later on in my process (with an update query). My question is, can you set the data type for that new field I want in the table? I can't seem to manipulate the properties dialog box to be of any help. When I use Commission:0 (Commission is the field name)
in the design grid, it works, but sets the data type to integer in the table, and I need it to be double. I've tried using
Commission:0.00
but that doesn't change it away from integer.

I would like to avoid going to my new table and having to change the data type there. Any hints out there?

Thanks!
 
You can try
Commission:Cdbl(0)
Then followup with an update query that sets the column to Null.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
I got a field type of Double with this:

Commission: CDbl(0)

However it all is 0.if I use NULL i get an error. How about just running CDbl(0), then another update query right afterwards to make it all Null. At least you get the type correct.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Ha, Duane beat me again[thumbsup2]

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi GingerR,
Just recently got home from watching my grandson while his mom was out to dinner. Found some time to hit Tek-Tips, public news groups, and Access list server.

Time to call it a night.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top