Modifying data in a table from a Form

Hierophant

Registered User.
Local time
Today, 15:55
Joined
Mar 14, 2003
Messages
28
Greetings,

I have hit a wall..

I have a List called List5, populated with Clients details, including ClientID. When one of the records is selected in List5, you can then hit Command23, which I want to have change some data in that record. One of the Client tables fields is 'Status', of which there are two possible values, either "Current", or "Past".

So a client is selected.
I need is a snippet of code to put in the Click event for the Command button, to change the current records value for its field 'Status' to "Past"..

I know, its probably simple.. but help me anyway please. ;)

Thanks very much, in advance!
Hierophant.
 
Ensure the control you wish to change is bound to the table, i.e maybe a hidden textbox on your form.

A bit of code like this on the command button's OnClick() event should suffice.

Code:
Private Sub cmdYourButton_Click()

   If txtYourTextBox = "Current" Then
      txtYourTextBox = "Past"
   End If

End Sub
 
Thanks!
 

Users who are viewing this thread

Back
Top Bottom