Re: Why wont this work in a update query

Tech-Archive recommends: Speed Up your PC by fixing your registry



If you look at this part of the SQL you posted:

" ... SET dbo_TblProductVersion.Attachments =
IIf([dbo_tblProductversion].[Attachments]=True,"Y","N") ... "

If [Attachments] is a Text Field, the first argument of the IIf is incorrect
since you compared a Text value with a Boolean value.

If [Attachments] is a Boolean Field, you cannot update its value with either
Text value "Y" or "N".

Either way (Text or Boolean Field), you will have error(s) with the Update
SQL due to data type mismatch!

--
HTH
Van T. Dinh
MVP (Access)



"troy" <troy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CD1D3102-E66F-4BD1-8D9B-6891C06AAF31@xxxxxxxxxxxxxxxx
HU?

Yes I changed my Y/N to a Text filed so my update query will pass to a
text
filed not a Y/N datatype

Attachments: IIf(dbo_tblProductversion.Attachments=True,"Y","N")



.



Relevant Pages

  • Re: Strip inbox details and populate db
    ... Easy enough to do using ADO code. ... them to the file system and then opening the files using something like ... tests it would be very similar, just a different connection to the SQL ... > outlooks inbox as well as any attachments. ...
    (microsoft.public.outlook.program_vba)
  • Re: Help with Docmd.runsql please.
    ... Since you want the value of TT, you need to put it outside of the quotes. ... I'm assuming that Answer is a boolean field. ... DoCmd.Runsql SQL ... I have tried replacing TT with and 'TT' ...
    (microsoft.public.access.forms)
  • Re: UPDATE QUERY PLEASE HELP!
    ... I explained the problem with the Update SQL in the orginal thread: ... doing a Boolean-value comparison on the Field and then ... The Field [Attachments] canNOT be ... In the Select SQL, the IIf expression is a Calculated Value only (not being ...
    (microsoft.public.access.queries)
  • Multiple tables refer to one -To use foreign keys or not?
    ... As one of my first encounters with SQL, ... To be able to relate each object to its eventual attachments, ... colleague felt that too many fields would remain empty with the first ... against it when the rest of the design does not. ...
    (comp.databases.theory)
  • Get attachments during an asynch OnSave event
    ... Information about it is placed into a SQL db ... The code is attached to an asynch onSave event. ... I can see if there are attachments by checking oRecord.Fields[ ... ADODB.Record oRecord = pNewEventInfo.EventRecord; ...
    (microsoft.public.exchange.development)