Combo Search - Results on diff form

expublish

Registered User.
Local time
Today, 03:18
Joined
Feb 22, 2002
Messages
121
Hi All,

I hope someone can help ...

I have a form which is like a menu page. It has a few combo boxes that open various other forms. It also has a combo box. This form is called Employee Main.

The combo box needs to look up the field Employee Name in the table Employees and then display the selected record in another form called Employees (same as the table it is based on). The form Employees has all fields that is in table Employees.

The main problem is the fact that the combo box is on a different form than the form that the results will be displayed on.

Does anyonme know how to setup this combo?

If it isn't possible does anyone know another method doing what I have explained above.

Thanks in advance,

Scott

To Mods - sorry for starting a new thread on this topic, the previous one got a little complicated and was very unclear. Feel free to delete the other one, as there is no useful info in it.
 
Scott

I have a small example of this action.

This is a zipped up Access 2000 database.

Please mail me if you would like to see this.

Graham
 
in the following code, the combo box is combo0, the form I'm opening on the after update of Combo0 is frmPeople, the field on the recordsource for frm people I'm comparing with combo0 is Pid. The bound column of combo0 is Pid. The recordsource for combo0 is the same as the recordsource of frmPeople.

Private Sub Combo0_AfterUpdate()

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmPeople"

stLinkCriteria = "[Pid]=" & Me![Combo0]
DoCmd.OpenForm stDocName, , , stLinkCriteria


End Sub
 
I chickened out in the end and created another form with the fields and the combo ob and then linked to this form from the main menu using a command button. I have still emailed you from my works address, Graham, as I am still interested in seeing how it works.

Cheers
Scott.
 

Users who are viewing this thread

Back
Top Bottom