updating a listbox

rew

Registered User.
Local time
Today, 04:42
Joined
Aug 22, 2005
Messages
19
Hi,
I've a listbox. Once i doubleclick on a data on this listbox an editing form will open.
I modify my data, save, close. But the data on the listbox are the same as before..
how can i update this data?? Something like once i saved & closed the editing form the listbox will update....don't know..
i've tried stuff like requery,refresh, ... but didn't work.. (was my mistake maybe)..:D
thx in advance
 
Open your other form with the acDialog argument to halt the code in the first form. Then your Me.ListBoxName.Requery when you get back will work.
 
RuralGuy said:
Open your other form with the acDialog argument to halt the code in the first form. Then your Me.ListBoxName.Requery when you get back will work.

mh, i'm not sure i get it..
now i've something like this

Code:
Private Sub List2_DblClick(Cancel As Integer)
DoCmd.OpenForm "inserimento_cliente", , , "[CLI_ID] = " & Me.List2, , acWindowNormal

End Sub

i've to put Me.List2.Requery after that?
i've already tried but isn't working.
I mean..it works once you doubleclick again on a record..not when you close&save the other form (named "inserimento_cliente")

thx again
 
Try this:
Code:
Private Sub List2_DblClick(Cancel As Integer)
DoCmd.OpenForm "inserimento_cliente", , , "[CLI_ID] = " & Me.List2, , [b]acDialog[/b]
Me.List2.Requery

End Sub
The acDialog argument will halt all of the code in the current form and not start it again until you close the next form.
 
RuralGuy said:
Try this:
Code:
Private Sub List2_DblClick(Cancel As Integer)
DoCmd.OpenForm "inserimento_cliente", , , "[CLI_ID] = " & Me.List2, , [b]acDialog[/b]
Me.List2.Requery

End Sub
The acDialog argument will halt all of the code in the current form and not start it again until you close the next form.

thx a lot! it works
 
You're welcome. Thanks for posting back with your success.
 

Users who are viewing this thread

Back
Top Bottom