Procedure for command button on form

3699wat

Registered User.
Local time
Today, 12:11
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?
 
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)
 
That's the way I have it now. Would to see it work with a command button.
 
I meant for you to put that code behind your command button.
 

Users who are viewing this thread

Back
Top Bottom