How update yes/no field in an unbound table

Posted on 2011-05-06
Last Modified: 2012-05-11
I have an unbound form which contains a combobox.  After the user has selected a record from the combobox I want the user to then be able to click a command button which I also have on the form.
When the user clicks this command button I want a field in a record in tblOutpurchase to be updated. The field name is "Complete" which is a yes/no field.  It is false by default and I want it changed to true.

I'm not sure of the syntax for the onclick event of the command button but it has to be something like:

update tblOutpurchase.complete = true where JobN = Me.cboJobN

Can someone help?

Question by:SteveL13
    1 Comment
    LVL 119

    Accepted Solution


    if  JobN is Number

    currentdb.execute "update tblOutpurchase set complete = true where JobN = " & Me.cboJobN

    if  JobN is Text

    currentdb.execute "update tblOutpurchase set complete = true where JobN = '" & Me.cboJobN & "'"

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now