Rookie,
There is a problem with this approach. Which is that the next time you
go to that patient's record, you won't be able to see which button was
clicked (or indeed if either has been). Well, that is, unless you have
the surgery/no surgery field dispolayed on the form... and then if you
have that, there's no point in using command buttons to enter it, as it
would be just as easy entering it directly on the form using a combobox
or something, know what I mean?
There is a nice way you can do this though. First of all, make the
field in the table that the surgery/no surgery relates to into a Number
data type. So 'Surgery' will be entered into the table "behind the
scenes" as 1, and 'No Surgery' will be entered as 2. Don't worry - when
it comes to the point of needing to display this data for the users, it
is easy to get it to actually show up as the human-readable "Surgery"
and "No Surgery".
Then, on your form, put an Option Group which is bound to this field in
your table. And then add two Toggle Buttons to the Option Group. Make
the lables on the toggle buttons to read 'Surgery' and 'No Surgery'.
Now you've got something that looks pretty much like the 2 command
buttons you originally had.
So now, the doctor can click 'Surgery' or 'No surgery'. You don't need
to use a macro or code to do anything. Which button was clicked will be
clearly visible because the button will be of a 'sunken' style. And
this will be shown for each patient the next time the form is opened at
their record.
Of course, there will be a bit of a learning curve for you in making
this happen. But it is actually not difficult, and will be worth the
effort.