I Have a form based on one table - tblhorsevisits which has a composite primary key of horseid and dateofvisit and foreign keys of customerid and also saddleid.
All I want to do is when a user tabs out of the horseid control I want a different text control (labelled horse name) to be populated with the name of the horse that corresponds to the horseid value. This means I need to effectively say something like:
select horsename "into the horse name field on the form"
from tblhorse
where horseid = "the value of horseid on the form".
I do not know visual basic yet and have been struggling to work out how to do this using the form horseid event - "on exit", then macro builder - action is SetValue and then using expression builder to set the value.
I am sure it must be simple but am stuck!
All I want to do is when a user tabs out of the horseid control I want a different text control (labelled horse name) to be populated with the name of the horse that corresponds to the horseid value. This means I need to effectively say something like:
select horsename "into the horse name field on the form"
from tblhorse
where horseid = "the value of horseid on the form".
I do not know visual basic yet and have been struggling to work out how to do this using the form horseid event - "on exit", then macro builder - action is SetValue and then using expression builder to set the value.
I am sure it must be simple but am stuck!