default value in a query

  • Thread starter Thread starter 00KobeBrian
  • Start date Start date
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.
 
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.
 
I cannot change the structure of the table. Other than manually input, is
there other solution? Say reset some default behaviour in Access query.
 
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.
 
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.
 
Back
Top