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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing Listbox Data

Status
Not open for further replies.

eavan

Technical User
Aug 6, 2003
51
GB
Guys,

I am really stuck on this one.

I am editing field data on FormA, saving it and returning to another form where I should see the data updated. One field in particular. However, no matter what i try it won't update the field until i re-enter again.I have tried requery, form onOpen, refresh button and a few hundred other things. Would anyone know. Cheers
 
Eavan,

Did you not post something similar:
thread702-1226170

Did you try to requery using the On Deactivate event of your FormA:

Private Sub Form_Deactivate()

DoCmd.Requery


End Sub

 
sorry ssatech. You are dead right i did post this same problem before. The below piece of code didn't work for me.
Where i am at the moment is that i hit the save button returning me to the form where the info should be updated, but the data isn't updated.But then when i click out of the form and back in again the data has been updated.It is such a balls.


Private Sub Form_Deactivate()

DoCmd.Requery


End Sub

 
ssatech, there doesn't seem to be any code behind it. I thought the macro's i build would build the code in the background. Sure what my macro does is Save the form that i made changes on, OpenForm (where changes should be reflected), and then Close(the form where i have made the changes)....i have made sure that other the other forms are shut down just to make sure the forms are freshly open.
 
O.K. but you still did not answer my question. Have you tried to requery your FormA on the On Deactivate event?
 
i thought i did in my earlier post.Sorry.

I did run

Private Sub Form_Deactivate()

DoCmd.Requery


End Sub

but it never worked. It is strange.The form is not updating even though i am opening it afresh.but then when i go back into it, the save has been registered.Very annoying.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top