Results 1 to 3 of 3
  1. #1
    Maki is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Canberra, AUS
    Posts
    2

    Correct syntax for updating boolean field

    Hi. I'm trying to run an update query on a boolean field.
    This is a process of normalising our dog training club membership database where I'm trying to separate all individual handler information from member table where a "member" is defined by a household. Original [tbl Members] had fields [First Name], [Surname], [First Name (2)], [Surname (2)], [Email], [Email (2)] and so on. In the new [tblHandler], I created a new field [Primary Contact], which is a Yes/No field and the handler originally was [First Name], [Surname] in [tbl Members] would have tick in this box.

    It seems to run the selection part ok so I'm guessing something is wrong with

    [tblHandler]![Primary Contact]=True



    in the following SQL.

    UPDATE tblHandler INNER JOIN [tbl Members] ON tblHandler.[Member id] = [tbl Members].[Member id] SET tblHandler.[Primary Contact] = [tblHandler]![Primary Contact]=True
    WHERE (((tblHandler.[Member id])=[tbl Members]![Member id]) AND ((tblHandler.[First Name])=[tbl Members]![First Name]) AND ((tblHandler.Surname)=[tbl Members]![Surname]));
    Could you please lead me to the correct syntax for boolean update? Thank you.

    Maki

  2. #2
    LillMcGill is offline Dagny fan
    Windows 8 Access 2010 64bit
    Join Date
    Oct 2010
    Location
    Southern USA
    Posts
    70
    SET [tblHandler]![Primary Contact]=True

  3. #3
    Maki is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Canberra, AUS
    Posts
    2
    Thank you Lill!
    I see now how it is with query design view.
    Much appreciated!

    Maki

Please reply to this thread with any new information or opinions.

Similar Threads

  1. simple boolean syntax ?
    By markjkubicki in forum Forms
    Replies: 3
    Last Post: 03-05-2013, 06:26 PM
  2. Correct Syntax
    By bidbud68 in forum Programming
    Replies: 6
    Last Post: 10-19-2012, 01:09 AM
  3. Correct Syntax For DoCmd
    By bidbud68 in forum Programming
    Replies: 3
    Last Post: 10-18-2012, 03:12 PM
  4. SQL Correct Syntax
    By tbassngal in forum Queries
    Replies: 11
    Last Post: 09-01-2011, 01:55 PM
  5. What is the correct syntax for
    By giladweil in forum Access
    Replies: 1
    Last Post: 07-29-2010, 04:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums