How to INSERT or UPDATE with empty string

  • Thread starter Thread starter Gina
  • Start date Start date
G

Gina

Hi.

my queries work (more or less satisfyingly)
..... 3 fields: (PK)text, text, currency

I have exported them to a text file where the fields are separeated by a
vbTab
on the import all works well ...
but if field2 has a null value or empty string the currency field3 does not
get updated ....

If field2 = "" Or IsNull(field2 ) Then field2 = field1
this way it works, field3 gets updated .... but is it not possible to update
a record with an empty value in one or more fields ....

Thanks,
Gina
 
Obviously, your PK field cannot contain a null value.

Now (I only ask this because my former boss was notorious for missng this)
are you sure that in the design of your table, Field2 is set to "Allow Zero
Length"?
 
Hi ... thanks for reminding me on 'put at least a value into the PK field'
;-)

yes .... just checked field2 was not allowed to contain empty value or so
:))
and the query now works even with an empty field2
thanks a lot ... such an easy solution!!!!

Gina
 

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

Back
Top