Results 1 to 2 of 2

Thread: Button click to update field in table

  1. #1
    Join Date
    Aug 2003
    Posts
    1

    Button click to update field in table

    Hi,

    On one of my forms I need a button that when clicked on would update a field in a table. Is this possible?

    Thanks in advance

    Steve

  2. #2
    Join Date
    Aug 2003
    Location
    In a galaxy far, far away...
    Posts
    28
    Of course it is possible.

    Just put the button on the form and edit its ON CLICK property.

    If the controls source is a query or a table just enter this:

    Private Sub MyButton_Click()
    MyField.Requery
    End Sub

    or if the field has no recordsource you can assign any values like the followings:

    Private Sub MyButton_Click()
    MyField.Value = "Anything you want"
    End Sub

    and so on.


    Hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •