F
fossy
This is my situation:
I have form (note: there is no table for the form), with a list-box
“SelectTitle†that lets you select from a table “tblJobTitlesâ€. I have a
button that will open a query “qryTrainigByTitleâ€.
What I want the process to be is:
1- Select a Title from the list box.
2- Click the button to open/run the query
3- The query will use the list box as a criteria
4- Query will return only the records that correspond to the job title.
What I have tried:
I place the following on the criteria field of the “BtTitle†column of the
query:
[Forms]![frmUpcomingTraining]![SelectTitle]
I was hoping to make the field look at the form -> listbox to get the value.
This didn’t work.
I also tried to set up a “SetTempVar†on the double click event of the
listbox as a macro.
SetTempVar ListTitle, [Forms]![frmUpcomingTraining]![SelectTitle]
OpenQuery qryTrainingByTitle, Datasheet, Edit
RunCommand Refresh
RemoveTempVar ListTitle
Then, on the criteria field of the “BtTitle†column of the query:
[TempVars]![ListTitle]
Once again, I was hoping to make the field look at the temporary variable to
get the value.
This didn’t work.
Any Help please…
I you guys are reading this forums pretty often, you will see that I try
different ways to make this work and for some reason is not working thanks
again for your help.
I donn't know if it is an easy deal tha im making it harder. Im Just so lost.
I have form (note: there is no table for the form), with a list-box
“SelectTitle†that lets you select from a table “tblJobTitlesâ€. I have a
button that will open a query “qryTrainigByTitleâ€.
What I want the process to be is:
1- Select a Title from the list box.
2- Click the button to open/run the query
3- The query will use the list box as a criteria
4- Query will return only the records that correspond to the job title.
What I have tried:
I place the following on the criteria field of the “BtTitle†column of the
query:
[Forms]![frmUpcomingTraining]![SelectTitle]
I was hoping to make the field look at the form -> listbox to get the value.
This didn’t work.
I also tried to set up a “SetTempVar†on the double click event of the
listbox as a macro.
SetTempVar ListTitle, [Forms]![frmUpcomingTraining]![SelectTitle]
OpenQuery qryTrainingByTitle, Datasheet, Edit
RunCommand Refresh
RemoveTempVar ListTitle
Then, on the criteria field of the “BtTitle†column of the query:
[TempVars]![ListTitle]
Once again, I was hoping to make the field look at the temporary variable to
get the value.
This didn’t work.
Any Help please…
I you guys are reading this forums pretty often, you will see that I try
different ways to make this work and for some reason is not working thanks
again for your help.
I donn't know if it is an easy deal tha im making it harder. Im Just so lost.