Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple programming solution eluding me

Status
Not open for further replies.

Salisar7

Programmer
Apr 23, 2008
5
US
I know this has got to be simple. I have a table that has two yes/no fields. Users manually check one of the checkboxes in field A through another input form. What I want to be able to do is create a button that will clear out this check box in each record in the database and check the checkbox for Field B as it does this. I can't seem to make this simple process work. I'm sure I'm not familiar enough with Access/VB syntax and that is my problem. It's got to be a simple loop through the database. Help would be greatly appreciates.

TIA
 
A starting point (VBA code):
Code:
DoCmd.RunSQL "UPDATE [your table] SET [field A]=False, [field B]=True"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks much. I knew it was simple. This helps for a lot of other things I'm trying to accomplish in this small app I'm working on as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top