Open Record in One Form from Another Form

award88

New member
Local time
Today, 01:19
Joined
Jan 16, 2013
Messages
2
I have a form called "Ticket Form". It has a combo box field called "Pool_Name". This combo box is populated with records from a table "Pool Info Table" and the field "Pool Name." I have a second form "Poll Info Form" that is based on the data in the "Pool Info Table".
When I have a record open in the "Ticket Form" I want to be able to double click on the name in the "Pool_Name" field and have it open the corresponding record in the "Pool Info Form." I have tried several different options form doing an OpenForm Macro and trying to set the Where field and have also tried a VBA with DoCmd.OpenForm both unsuccessful. The closest I got was getting the OpenForm to open the "Pool Info Form" to the first record.
 
So I tried that, in it did not work so perhaps more details will help. We have a ticket tracking database for when a service request is called in. Those get entered into the ticket form. The "pool name" field is a combo box that is populated by the name of each pool. Each pool has its own record in the pool info form. I am trying to set it up so that when some one has a ticket pulled up they can double click on the pool name and it will open up that pools info page in the pool info form.
 
What does "did not work" mean exactly? Error, wrong result, etc. Can you post the db here?
 
Try this:

To have the "Pool" form open to a specific record, when you double click that record in the "Pool Name" Combo box, put the following macro in the "On double click" event of the "Pool Name" Combo Box:

SetTempVar

Name: tmpID
Expression = [Pool Name] (the name of the Combo Box)

Open Form

Form Name: Pool Info Form
Where Condition = [PoolID] = [TempVars]![tmpID]
Data Mode Edit
Window Mode Dialoge


You will need to change the field names to exactly match those in your tables, but that works for me. The drop down boxes and autofill and magic wand should help you get it right.

Bear in mind that ebcause this is a combo box, you will need to click a pool name in the drop-down first to select it and THEN double click the combo box to open the form - so three clicks in all.
 

Users who are viewing this thread

Back
Top Bottom