Logical Field ?

  • Thread starter Thread starter Mike J
  • Start date Start date
M

Mike J

In VBA I am trying to set a YES/NO fiel to Yes or true.

rstMyTable!Field = True doesn't work.

How do I set it to true?

Mike
 
I assume "Field" means the Field Name of the Field you want to set the value
for the current Record of the Recordset.

* Have you checked and make sure the Recordset is updateable?

* Do you have rstMyTable.Update after the posted statement?
 
It will probably work, since any numeric value other than 0 is usually
interpreted as True in Boolean assignments, but vbYes is actually one
of the defined (Integer) vbMsgBoxResult return values, not a Boolean
value.

As others have implied, the OP's syntax is correct, but there may be a
missing .Update statement.
 
Back
Top