Procedure for command button on form (1 Viewer)

3699wat

Registered User.
Local time
Yesterday, 19:53
Joined
Oct 28, 2002
Messages
83
In a table (tblProcedures) bound to form (frmProcedures) I have a field called Archive (Yes / No property). The form shows a list of procedures. Clicking on a procedure shows it’s specifics in a couple of textboxes. I would like to set a command button that when clicked would set the property for field Archive to Yes. What procedure do I write to make this work?
 

Mile-O

Back once again...
Local time
Today, 00:53
Joined
Dec 10, 2002
Messages
11,316
The easiest method would be to have a checkbox on your form that is bound to the Yes/No field - this can be hidden if you want.

The procedure then would be as simple as

Me.chkYourCheckboxHere = True


If you wanted the command button to switch back and forth between Yes and No with every click then:

Me.chkYourCheckBoxHere = IIf(chkYourCheckBoxHere = True, False, True)
 

3699wat

Registered User.
Local time
Yesterday, 19:53
Joined
Oct 28, 2002
Messages
83
That's the way I have it now. Would to see it work with a command button.
 

Mile-O

Back once again...
Local time
Today, 00:53
Joined
Dec 10, 2002
Messages
11,316
I meant for you to put that code behind your command button.
 

Users who are viewing this thread

Top Bottom