Command Button clearing table?

HowardChr

Noob
Local time
Today, 16:33
Joined
Apr 26, 2007
Messages
35
Is there a way to have a command button on a form, when pressed change all fields in a Table to show unchecked? I am using a Table that has nothing but Yes/No fields in it. If this is possible, what might the code look like? Table name is "InputH-1".

You guys/girls are awesome! Thanks in advance for all your help!
 
An update query with SQL something like

UPDATE InputH-1 SET InputH-1.NameOfFieldToBeupdated = False, InputH-1.NextNameOfFieldToBeupdated = False;

etc etc

anyway try new query and make it an update query.
 
When I put this in "UPDATE InputH-1 SET InputH-1.Refrigeration = False;" I am getting an error message that states "expected end of statement" and it
highlights the word SET. Am I doing something wrong?
 
When I put this in "UPDATE InputH-1 SET InputH-1.Refrigeration = False;" I am getting an error message that states "expected end of statement" and it
highlights the word SET. Am I doing something wrong?


I found the answer after playing around. In case anyone was wandering an answer, or having the problem themselves, here's what you do. Open a Query in design view, and then select to open an SQL View. For my particular problem the answer ended up being: "UPDATE [Input] SET [Input].Refrig = False, [Input].[Damaged] = False, [Input].We = False, [Input].Disp = False, [Input].Floor = False, [Input].De = False, [Input].Ob = False, [Input].Spill = False, [Input].[Bar] = False;"

Happy Coding!
 

Users who are viewing this thread

Back
Top Bottom