Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: combo boxes and bookmarks


Message #1 by "patrick slesicki" <patrick_slesicki@d...> on Wed, 28 Nov 2001 17:38:18
I've a data entry form with to subforms. On the main form I've created a 

combo box using the wizard to find specific records in my database. The 

code for the combo box is 



Private Sub cboFindContract_AfterUpdate()

Me.RecordsetClone.FindFirst "[ContractID] = '" & Me![cboFindContract] & "'"

Me.Bookmark = Me.RecordsetClone.Bookmark

End Sub



My problem is that my subforms no longer want to synchronize with the 

parent form, and so the database thinks I'm editing records when all I'm 

doing is scrolling through my records. I think it started after deleting a 

record. I've tried adding Me.Requery and Me. refresh at the beginning of 

the line but that doesn't seem to work. The master/child links between 

form and subform are present. I'm working with SR2. Please help.
Message #2 by "John Ruff" <papparuff@c...> on Wed, 28 Nov 2001 14:57:55 -0800
Try this Patrick



Rem all your code in cboFindContract_AfterUpdate event and add the

following



	me.filteron=true

	me.filter="ContractID='" & cboFindContract & "'"

	

If you want to remove the filter then add a button (btnViewAll) and on

it's Click event add



	docmd.showallrecords





John Ruff - The Eternal Optimist :-)







-----Original Message-----

From: patrick slesicki [mailto:patrick_slesicki@d...] 

Sent: Wednesday, November 28, 2001 5:38 PM

To: Access

Subject: [access] combo boxes and bookmarks





I've a data entry form with to subforms. On the main form I've created a



combo box using the wizard to find specific records in my database. The 

code for the combo box is 



Private Sub cboFindContract_AfterUpdate() Me.RecordsetClone.FindFirst

"[ContractID] = '" & Me![cboFindContract] & "'" Me.Bookmark 

Me.RecordsetClone.Bookmark End Sub



My problem is that my subforms no longer want to synchronize with the 

parent form, and so the database thinks I'm editing records when all I'm



doing is scrolling through my records. I think it started after deleting

a 

record. I've tried adding Me.Requery and Me. refresh at the beginning of



the line but that doesn't seem to work. The master/child links between 

form and subform are present. I'm working with SR2. Please help.

---

You are currently subscribed to access as: papparuff@c... To

unsubscribe send a blank email to $subst('Email.Unsub')



Read the future with ebooks at B&N

http://service.bfast.com/bfast/click?bfmid=2181&sourceid=38934667&catego

ryid=rn_ebooks







Message #3 by Patrick_Slesicki@d... on Wed, 28 Nov 2001 15:51:13 -0800

Thanks John,



Simple, elegant, and effective solution.




  Return to Index