From: Hesham Sakr on 9 Mar 2010 19:09 Hi, I want to put a combo box on a form the lists values (PK) of records on another form. I want to know how when I select a value from the combo box it can open that other form on the specific record i selected its PK??
From: John W. Vinson on 9 Mar 2010 20:01 On Tue, 9 Mar 2010 16:09:01 -0800, Hesham Sakr <HeshamSakr(a)discussions.microsoft.com> wrote: >Hi, > >I want to put a combo box on a form the lists values (PK) of records on >another form. I want to know how when I select a value from the combo box it >can open that other form on the specific record i selected its PK?? > See the VBA help for the "OpenForm" method. One of its arguments is a WhereCondition; you can use the AfterUpdate event of the combo to open the other form, something like Private Sub mycombo_AfterUpdate() Dim strDocument As String Dim strCriteria As String strDocument = "FormYouWantToOpen" strCriteria = "[PKFieldname] = " & Me!mycombo DoCmd.OpenForm strDocument, WhereCondition := strCriteria, <other options> End Sub -- John W. Vinson [MVP]
From: De Jager on 11 Mar 2010 11:02 "Hesham Sakr" <HeshamSakr(a)discussions.microsoft.com> wrote in message news:F6D00412-C45D-4A90-88DC-4D4E175979CF(a)microsoft.com... > Hi, > > I want to put a combo box on a form the lists values (PK) of records on > another form. I want to know how when I select a value from the combo box > it > can open that other form on the specific record i selected its PK?? > >
From: joelgeraldine on 17 Mar 2010 09:33 µù* ^ "Hesham Sakr" <HeshamSakr(a)discussions.microsoft.com> a écrit dans le message de groupe de discussion : F6D00412-C45D-4A90-88DC-4D4E175979CF(a)microsoft.com... > Hi, > > I want to put a combo box on a form the lists values (PK) of records on > another form. I want to know how when I select a value from the combo box > it > can open that other form on the specific record i selected its PK?? > >
|
Pages: 1 Prev: Update Query! Next: How can I create stock emails to reply to clients? |