If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Combo Box
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?? |
#2
|
|||
|
|||
Combo Box
On Tue, 9 Mar 2010 16:09:01 -0800, Hesham Sakr
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] |
#3
|
|||
|
|||
Combo Box
"Hesham Sakr" wrote in message ... 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?? |
#4
|
|||
|
|||
Combo Box
µù*
^ "Hesham Sakr" a écrit dans le message de groupe de discussion : ... 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?? |
Thread Tools | |
Display Modes | |
|
|