A
AccessHelp
Good morning,
One of my forms is designed to change the information on records from a
table. In the Form Header section of the form, I have a search function to
search the records that users want to change in the Detail section of the
form. One of the search fields is a wild card text field (meaning the users
can type in something and press a command button. Then the Detail section
will show the records closed to that words or letters). The wild card text
search field (Search A) is connected to the student name field (Field A) in
the Detail section.
The Field A is not a field in a table, and I use "DLookup" to show the
student name on the form. Next to the Field A, I have a field for Student ID
(Field B). When the users change the Field B on the form, the Field A will
show the student name of that student ID.
I have no problem pulled up the records when the users type in a criterion
and press the command button to search for the records. I have problems
after the users find the records and make changes to the Field B (Student
ID). When the users change the Field B, the Field A changes; however, the
record is still showing up on the form. Technically, the record(s) should go
away because the student name is no longer matched with the criterion in
Search A. Additionally, if I type in a criterion on that changed student
name, that record would not show because the form is still memorizing the old
student name (before change). If I leave the form and come back in, then the
form recognizes the change to the student name.
How can I do to make the form to recognize the form without leaving the form
and adding a student name field in a table? I have tried adding "Me.Refresh"
in the command button and in the BeforeUpdate of Student ID and Student Name,
and they don't seem to work.
Please help. Thanks.
One of my forms is designed to change the information on records from a
table. In the Form Header section of the form, I have a search function to
search the records that users want to change in the Detail section of the
form. One of the search fields is a wild card text field (meaning the users
can type in something and press a command button. Then the Detail section
will show the records closed to that words or letters). The wild card text
search field (Search A) is connected to the student name field (Field A) in
the Detail section.
The Field A is not a field in a table, and I use "DLookup" to show the
student name on the form. Next to the Field A, I have a field for Student ID
(Field B). When the users change the Field B on the form, the Field A will
show the student name of that student ID.
I have no problem pulled up the records when the users type in a criterion
and press the command button to search for the records. I have problems
after the users find the records and make changes to the Field B (Student
ID). When the users change the Field B, the Field A changes; however, the
record is still showing up on the form. Technically, the record(s) should go
away because the student name is no longer matched with the criterion in
Search A. Additionally, if I type in a criterion on that changed student
name, that record would not show because the form is still memorizing the old
student name (before change). If I leave the form and come back in, then the
form recognizes the change to the student name.
How can I do to make the form to recognize the form without leaving the form
and adding a student name field in a table? I have tried adding "Me.Refresh"
in the command button and in the BeforeUpdate of Student ID and Student Name,
and they don't seem to work.
Please help. Thanks.