List not updating form

rsbutterfly16

Registered User.
Local time
Yesterday, 19:05
Joined
Jun 5, 2006
Messages
77
hi guys i have a list box which has 4 columns that come from a query. when a user double clicks a selected item, i want the frmUPdate to open with the selected item; it gives me no error it just always goes to the 1st contract . have no idea what else to try...

here is the code:


Private Sub List33_DblClick(Cancel As Integer)

Dim rs As Object

DoCmd.OpenForm "frmUpdate"

Set rs = Forms!frmUpdate.Recordset.Clone
rs.FindLast "[ContractID] = " & str(Nz(Me![List33]))
If Not rs.EOF Then Forms!frmUpdate.Bookmark = rs.Bookmark


DoCmd.Close acForm, Me.Name

End Sub
 
yes i tried that the only difference is that it goes to the first line or the last line. but it does not go to the selected item. what else can i try???:confused:

i tried changing my code to this also:

Dim rs As Object
DoCmd.OpenForm "frmUpdate"
Set rs = Forms!frmUpdate.RecordsetClone
MsgBox "Searching For " & Me.List33 '* to check if is getting the correct data
rs.FindFirst "[contractId] = " & Me![List33]

If Not rs.NoMatch Then Forms!frmUpdate.Bookmark = rs.Bookmark Else MsgBox "Not found"

DoCmd.Close acForm, Me.Name


so its says searching for "contract Id" displays correct id
but then it goes to "not found"

why is this happening? my frmUpdate is bound to a table. help!!
 
Last edited:
still no solution, listbox selection not updating new form

any help will be greatly apreciate it!!!!!! :o
 
Have you tried doing a message box to come up with the value of Me![List33]
to see if it is returning the information you are wanting? Maybe the find is looking for something that you really don't want to look for.
 
yes you see the line that says
MsgBox "Searching For " & Me.List33 '* to check if is getting the correct data

is says searching for 100001 and it is the right thing.... still swamp , any advice would be greatly apreciate it...
 

Users who are viewing this thread

Back
Top Bottom