Form Update with New Record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a listbox that contains a listing of all of the primary keys for the
form from the table the form is based on. When a selection is made, the form
navigates to that record. (Much like the "Find a record on my form based on
the value I selected in my combo box" option, except with a listbox) This
works fine except in the following condition.

My probem arrises when I create a new record for the form. A button is
clicked to open a form to enter the information for the new record. After
Save is clicked, the original form is to update with the new record and the
data entry form is closed. The List box updates and shows the new record, but
the form does not. For Instance, If i started with 3 records, created a
fourth and click save the form still says showing 1 of 3. How do I update
the records on the Form? I've noticed that If i close the form and re-open
it manually the record is recognized, however if i try this with code it does
not. I have also tried requerying the form but i'm not sure if that is
supposed to work or not.

Thanks in advance,

Pip'n
 
I have also tried requerying the form but i'm not sure if that is
supposed to work or not.

normally, yes, you would have to requery both the listbox in the first form,
and the form itself. where did you put the code that successfully requeries
the listbox? please copy/paste the *form* requery code into a post, and tell
us exactly where you're running it from.

hth
 
Back
Top