Steven-
You need a separate *unbound* combo box named cmbMemberLookup. (Unbound means
the control has no Control Source.) Use the same Row Source that you had for
MemberID, and add this code:
Private Sub cmbMemberLookup_AfterUpdate()
Me.Recordset.FindFirst "MemberID = " & Me.cmbMemberLookup
End Sub
Private Sub Form_Current()
' Keep the search combo in sync with the current record
Me.cmbMemberLookup = Me.MemberID
End Sub
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of S and M
Sent: Wednesday, May 25, 2011 11:53 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Selecting a record set with a combo box
Hi all,
I created a form with a sub form to edit / enter data into two tables.
Everything works great and I can edit / add records and they save fine.
My problem will be when the tables get several hundred entries. I need to be
able to select the entry I want to edit from a drop down box.
The two forms are linked by MemberID,..the main forms record source is
the main table and the subform is a select statement of other table.
If I change the memberID field to a combo box, and add a select statement, it
will list the ID's but will not allow me to select one.
What am I not doing?
Thanks, Steven
------------------------------------
Yahoo! Groups Links
Rabu, 25 Mei 2011
RE: [MS_AccessPros] Selecting a record set with a combo box
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar