Refresh Table Image List

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

Guest

I have a entry form that has a Combo list field named "Name_Lookup".
This field allows user to enter the last name of a person, which in turn, as
the user types the last name of the person, attempts to search a table of
people last names in search of a match, on match found, prefile the rest of
the screen with full person name, address, etc. to other unbound text fields.


If the person's last name is not in the Table, I have a Tabbed form page on
the same form that allows the user to enter this person to the person name
table. I want the user to be able to:

1). If the name entered into "Name_Lookup" combo box field is found, then
display the full name information and continue with entry of other data.

2) If the name entered into "Name_Lookup" does not match, allow the user to
flip to 'person entry page', enter the name into the table, save the record,
then return to step 1 above without ever exiting the original form (because
its a tabbed form) . Then, re-enter the name on the "Name_Lookup" combo box
field and be able to see the newly entered information and continue on with
the form and be able to select and save this data. What do I have to do to
refresh this information?

The Name_Lookup combo box is going agaist the table name, not a subset or
query set.

I've tried using Me.Name_Lookup.ReQuery on the "ON CHANGE" and it still
does not locate the newly entered name.

Any clues to refresh this data realtime.

Thanks,
 
Robert,

I think you should call the requery event after the user saves the new entry
in the second tab. I assume that the second tab is a subform to the lookup
table. This will make sure that the underlying data gets refreshed.

the event is Form_AfterUpdate()

Good luck,

Stewart Rogers
 
Stewart,

Thanks for responding so quickly.

I was able to make it work by adding the following VB code to the
"AFTER UPDATE" event.

Private Sub Name_LookUp_AfterUpdate()

Me.Refresh

Atty_FNme_Txt = Name_LookUp.Column(1)
Atty_MNme_Txt = Name_LookUp.Column(2)
Atty_Firm_Txt = Name_LookUp.Column(3)
ATTY_NUM = Name_LookUp.Column(4)
Atty_Addr1_Txt = Name_LookUp.Column(5)
Atty_Addr2_Txt = Name_LookUp.Column(6)
Atty_City_Txt = Name_LookUp.Column(7)
Atty_State_Txt = Name_LookUp.Column(8)
Atty_Zip_Cde = Name_LookUp.Column(9)
Atty_TPhone_Txt = Name_LookUp.Column(10)

End Sub

The Me.Refresh statement refreshes the input screen without losing any
other previously entered data. If you use Me.Requery you lose previous
input.

So others, beware, of the actions of both Me.Refresh and Me.Requery.

Thanks Stewart
And the others that monitor this site as well.
 
Back
Top