D
Don
On a form there is a sub-form which lists the e-mail addresses of a member,
one of which is flagged as the primary address with a boolean check box. On
the main form there is a hidden text box whose data source is a member ID
number. On the sub form, me.RecordSource is used with a SQL statement to
load the e-mail addresses. It works fine when the main form is opened, but
when the user moves to another member, the e-mail addresses don't change;
they are the ones from the first displayed member. In the code that changes
members, I added the following:
me!subFormEMail.Requery
but the sub-form does not update.
Am I off base here with this design? Part of the reason for going this way
was that I have code on the sub-form to ensure the user only has one e-mail
address picked as the primary. To make the display work it appears the form
needs to requery the database to get changes that are made.
For example if a member has the address (e-mail address removed) in the database and
it is marked primary, when the user adds the address (e-mail address removed) and
marks it as primary, the sub-form shows both as primary, but the underlying
database correctly reflects only (e-mail address removed) as the primary.
Any ideas?
Thanks!
Don
one of which is flagged as the primary address with a boolean check box. On
the main form there is a hidden text box whose data source is a member ID
number. On the sub form, me.RecordSource is used with a SQL statement to
load the e-mail addresses. It works fine when the main form is opened, but
when the user moves to another member, the e-mail addresses don't change;
they are the ones from the first displayed member. In the code that changes
members, I added the following:
me!subFormEMail.Requery
but the sub-form does not update.
Am I off base here with this design? Part of the reason for going this way
was that I have code on the sub-form to ensure the user only has one e-mail
address picked as the primary. To make the display work it appears the form
needs to requery the database to get changes that are made.
For example if a member has the address (e-mail address removed) in the database and
it is marked primary, when the user adds the address (e-mail address removed) and
marks it as primary, the sub-form shows both as primary, but the underlying
database correctly reflects only (e-mail address removed) as the primary.
Any ideas?
Thanks!
Don