A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

default value in a query



 
 
Thread Tools Display Modes
  #1  
Old November 2nd, 2006, 03:16 AM posted to microsoft.public.access.forms,microsoft.public.access.formscoding
00KobeBrian
external usenet poster
 
Posts: 77
Default default value in a query

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.


  #2  
Old November 2nd, 2006, 03:48 AM posted to microsoft.public.access.forms,microsoft.public.access.formscoding
Damian S
external usenet poster
 
Posts: 741
Default default value in a query

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.

"00KobeBrian" wrote:

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.



  #3  
Old November 2nd, 2006, 04:13 AM posted to microsoft.public.access.forms,microsoft.public.access.formscoding
00KobeBrian
external usenet poster
 
Posts: 77
Default default value in a query

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

"Damian S" wrote in message
...
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.

"00KobeBrian" wrote:

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.





  #4  
Old November 2nd, 2006, 04:28 AM posted to microsoft.public.access.forms,microsoft.public.access.formscoding
Damian S
external usenet poster
 
Posts: 741
Default default value in a 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.

"00KobeBrian" wrote:

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

"Damian S" wrote in message
...
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.

"00KobeBrian" wrote:

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.






  #5  
Old November 2nd, 2006, 05:35 AM posted to microsoft.public.access.forms,microsoft.public.access.formscoding
00KobeBrian
external usenet poster
 
Posts: 77
Default default value in a query

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.

"Damian S" wrote in message
news
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.

"00KobeBrian" wrote:

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

"Damian S" wrote in message
...
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.

"00KobeBrian" wrote:

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.








 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:26 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.