C
cbnewman
What is the syntax for referring to the underlying record that a form
is currently displaying?
In other words, I would like to make a change to an attribute of a
record that is being displayed when a user clicks a button. I believe
the best way to do this is through modifying the VB code that
underlies the onClick event, but I can't figure out how to reference
the record that is being displayed in the current (or active) record.
In this case, we're dealing with a boolean value (I realize that I
could simply have the checkbox in the form, have the user check or
uncheck the box, then submit the form. In this application, it is more
intuitive to have the user click a button that will simultaneously
commit the transaction and update the attribute). The user uses the
form to search or navigate to a record of interest. When they click
the "Discharge Patient" button, the boolean attribute "is_admitted"
changes to false and the form exits.
How do I reference or modify this data? Seems like I could generate a
SQL statement and submit it (in this case, I would still have to know
how to reference the current record within the SQL statement, I'm also
not sure how to submit a SQL statement within VBA). But it also seems
logical that there might be a way to modify the record within the form
itself (i.e. set currentRecord.is_admitted to FALSE) using just VBA.
Thanks,
--b
is currently displaying?
In other words, I would like to make a change to an attribute of a
record that is being displayed when a user clicks a button. I believe
the best way to do this is through modifying the VB code that
underlies the onClick event, but I can't figure out how to reference
the record that is being displayed in the current (or active) record.
In this case, we're dealing with a boolean value (I realize that I
could simply have the checkbox in the form, have the user check or
uncheck the box, then submit the form. In this application, it is more
intuitive to have the user click a button that will simultaneously
commit the transaction and update the attribute). The user uses the
form to search or navigate to a record of interest. When they click
the "Discharge Patient" button, the boolean attribute "is_admitted"
changes to false and the form exits.
How do I reference or modify this data? Seems like I could generate a
SQL statement and submit it (in this case, I would still have to know
how to reference the current record within the SQL statement, I'm also
not sure how to submit a SQL statement within VBA). But it also seems
logical that there might be a way to modify the record within the form
itself (i.e. set currentRecord.is_admitted to FALSE) using just VBA.
Thanks,
--b