default value in a query

0

00KobeBrian

I try to insert some records into a table by using append query. Say there
is field A, B, C in the table. I append field A and B in the append query
and not field C. Field A,B,C are required field. But the query won't
append because I didn't append field C. Now if I assign field C as an empty
string, the query appends. How can I change the access 97 query so that by
default, the non-append field get an empty string value if I don't put it on
the query automatically? Thanks.
 
G

Guest

Hi 00KobeBrian,

Set default values for fields in your table design for all required fields,
or when you insert a record, ensure you specify a value for them.

Damian.
 
0

00KobeBrian

I cannot change the structure of the table. Other than manually input, is
there other solution? Say reset some default behaviour in Access query.
 
G

Guest

Not that I know of... If you are writing the append query, can't you just
check for nulls and handle where necessary? eg: iif(isnull(FIELD), "",
FIELD) will check if that field is null and if it is, use the empty string,
if it's not, use the field value.

D.
 
0

00KobeBrian

The problem is I got too many access program and query doing this. That's
why if there is an automatical way, will be much better.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top