S
ScottStoecker
I'm new to programming Access, and I'm having a problem with giving
focus to a row. What is happening is that I click an OK button in a
form and this opens a new form, which happens without a problem. Next,
the newly opened form is populated from a query which returns all the
organizations in the database. In the form detail section, it returns
(among other things) the OrganizationID field. I would like to give
focus to the OrgID TextBox control in the new form so that this
particular OrganizationID is highlighted for the user. I am
successfully passing the OrganizationID to the new form - I can tell by
checking the value of the OpenArgs parameter.
The problem is that I don't know how to loop through the fields in
Access. I've tried using the RecordSet property, the RecordsetClone
property, looping through each control on the form and searching for
the value passed via the OpenArgs parameter - I just don't know how
Access does this. Can anyone help guide me in the right direction?
Thank you,
Scott
focus to a row. What is happening is that I click an OK button in a
form and this opens a new form, which happens without a problem. Next,
the newly opened form is populated from a query which returns all the
organizations in the database. In the form detail section, it returns
(among other things) the OrganizationID field. I would like to give
focus to the OrgID TextBox control in the new form so that this
particular OrganizationID is highlighted for the user. I am
successfully passing the OrganizationID to the new form - I can tell by
checking the value of the OpenArgs parameter.
The problem is that I don't know how to loop through the fields in
Access. I've tried using the RecordSet property, the RecordsetClone
property, looping through each control on the form and searching for
the value passed via the OpenArgs parameter - I just don't know how
Access does this. Can anyone help guide me in the right direction?
Thank you,
Scott