Setting Null value in table???

  • Thread starter Thread starter Niklas Östergren
  • Start date Start date
N

Niklas Östergren

Hi!

I´m starting to get tired, obviously :-(, because I can´t remeber how to set
Null value in a Long field in a table.

I want to clear the value stored in the table but can´t figure it out
*stupid me*!!! Any help would be apreciated!

This is the code I have tryed with but it don´t eork because field [Value]
in the table is of data type Long.

TIA!
// Niklas

===================================================
Me![cboMemberShipType] = ""
rst.Edit
rst![Value] = Me![cboMemberShipType]
rst![Description] = "Selected membership type, " & "" & "."
rst.Update ' Update the recordset.
 
Niklas Östergren said:
Hi!

I´m starting to get tired, obviously :-(, because I can´t remeber how
to set Null value in a Long field in a table.

I want to clear the value stored in the table but can´t figure it out
*stupid me*!!! Any help would be apreciated!

This is the code I have tryed with but it don´t eork because field
[Value] in the table is of data type Long.

TIA!
// Niklas

===================================================
Me![cboMemberShipType] = ""
rst.Edit
rst![Value] = Me![cboMemberShipType]
rst![Description] = "Selected membership type, " & "" & "."
rst.Update ' Update the recordset.


I don't understand the relationship between the control
cboMemberShipType and the field "Value" -- I hope that's not really the
field's name! -- in the recordset. Clear cboMemberShipType like this:

Me!cboMemberShipType = Null

If rst !Value is a Long Integer field, then clear it like this:

rst!Value = Null

Note that this will only work if the field is defined to allow Null to
be stored in it.
 
Thank´s Dirk!

I did actually try with "Null" but it wouldn´t work so I was a little bit
confused which was the reason to my post. I hade som other error in my cod
which I found after checking it again after your reply!

Thank´s a lot!

// Niklas

Dirk Goldgar said:
Niklas Östergren said:
Hi!

I´m starting to get tired, obviously :-(, because I can´t remeber how
to set Null value in a Long field in a table.

I want to clear the value stored in the table but can´t figure it out
*stupid me*!!! Any help would be apreciated!

This is the code I have tryed with but it don´t eork because field
[Value] in the table is of data type Long.

TIA!
// Niklas

===================================================
Me![cboMemberShipType] = ""
rst.Edit
rst![Value] = Me![cboMemberShipType]
rst![Description] = "Selected membership type, " & "" & "."
rst.Update ' Update the recordset.


I don't understand the relationship between the control
cboMemberShipType and the field "Value" -- I hope that's not really the
field's name! -- in the recordset. Clear cboMemberShipType like this:

Me!cboMemberShipType = Null

If rst !Value is a Long Integer field, then clear it like this:

rst!Value = Null

Note that this will only work if the field is defined to allow Null to
be stored in it.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Back
Top