G
Guest
Hi,
I've been trying to figure out how to requery a subform after I have added a
record to the main form.
I have a combo box in the form header that looks up a record in the main
form and gives the related info in the subform. I have also added code to
enter the new value to the table if the value does not already exist in the
table as indicated on this website -
http://www.mvps.org/access/forms/frm0015.htm
The problem is that when a new value is added to the table it doesn't update
the form and subform properly. It automatically brings up the first record,
even though an new value has been added to the table. I've seen posts that
recommend adding some code to the after update event of the combo box - the
problem that I'm having with that is that I already have code in that event
and I don't know how to add this new code. Is there someplace else that I
should be entering the code to requery the combo box? If so, what code and
where should it be placed?
Thanks
Joey
I've been trying to figure out how to requery a subform after I have added a
record to the main form.
I have a combo box in the form header that looks up a record in the main
form and gives the related info in the subform. I have also added code to
enter the new value to the table if the value does not already exist in the
table as indicated on this website -
http://www.mvps.org/access/forms/frm0015.htm
The problem is that when a new value is added to the table it doesn't update
the form and subform properly. It automatically brings up the first record,
even though an new value has been added to the table. I've seen posts that
recommend adding some code to the after update event of the combo box - the
problem that I'm having with that is that I already have code in that event
and I don't know how to add this new code. Is there someplace else that I
should be entering the code to requery the combo box? If so, what code and
where should it be placed?
Thanks
Joey