Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing Table/Combo after Record Deletion

Status
Not open for further replies.

CyrusAyers

Programmer
Feb 4, 2004
25
US
I have two forms involved in the dilemma. One is a "Main" form with a Tab control, the other is a pop-up form.
The pop-up form, as a safeguard, is used to alter/add/delete information in the [AccountHolders] table that is displayed on the Main form.
The Main form uses a combo-box to quickly navigate records and has a conditional field liked to VBA script (it conditionally displays a checkbox for sales tax depending on the Accountholders status).
If i add or delete a record on the Pop-up form, when i move back to the Main form, the name appears in the Combo-box, but i cant navigate to it using the record selectors. Additionally, the conditionally appearing Sales Tax checkbox is not recognized in the VBA and generates an error.
Ive tried attempted versions of [Form].Requery and [Combo].Requery to no avail. I seem think the awnser will be tied closely to the VBA action of the linked SalesTaxCheckbox, because it recognizes the box before the additon. Closing and re-opening the entire thing allows me to find the new addition with the record selectors, but dosent help the Not Found Error (2424)
I know that i need to synchronize or refresh the data but could use a pointer, could you help?
 
have you tried closing and re-opening the form in one action?

Be ALERT - Your country needs Lerts
 
You need to use Refresh instead of Requery. I am doing something very similar with a combo box and use FormName.Refresh to update the combo box.


Dave
 
Excellent! .Refresh seems to work, I must have misunderstood the documentaion, but thanks, what a relief!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top