Unanswered: highlight record on form and show record and details on another form
I'm new to VBA programming and learning.
I'm trying to design a form that opens up when a user selects an entry from a switchboard. This form should display records from a query in continuous form format. I want to include check boxes (or radio buttons) next to each record and when the user checks a check box (or radio button) next to a particlar record the entire record (6 fields) should be highlighted (in some color, ex. yellow). There is a command button on this form and when the user clicks this command button a new form with a sub form should open and the highlighted record should be displayed in the main form at the top, and the details (based on a particular field in the record) should be displayed on the sub form.
unfortunately you cannot do it the way you propose: unbound radio buttons or checkboxes on continuous forms are on or off for all records. click one, and they all change.
the simplest route around this is to give your continuous forms a header (or footer) and repeat the fields there. when the user clicks a record in the continuous form detail, the current record data will be displayed in the header (footer).
using the ID from the header (footer) you open your new form at the appropriate record using arguments:
private sub theButton_Click()
dim strLinkCriteria as string
strLinkCriteria = "[nameOfIDfield]=" & Me![nameOfIDfield]
docmd.openform "nameOfTheOtherForm", , , strLinkCriteria
(replace theButton, nameOfIDfield, nameOfTheOtherForm with the real names, of course)