MarkBiernacki
Programmer
Hello,
I have a Access 97 app, that I converted to 2000, then upsized to SQL 7. I have two tables. The First one Counties has fields County_ID, and CountyName. The second has demographic info in it. When I display a form with the demographic info, i want it to lookup the county name from the Counties table. I have a listbox and and want to have it populate it automatically. What I need to know is how to pass the county_ID to the sql statement that I have in the Row Source
select DISTINCTROW [Counties].[CountyName] from [Counties] where [Counties].[County_ID] = ??? Control Source ????
??? Control Source ??? is where I get stuck.
select DISTINCTROW [Counties].[CountyName] from [Counties] where [Counties].[County_ID] = !Current.County_ID!
Is there a var that I can use for control source. $CurrentRecord or something like that. This is driving me crazy. It seems so simple, yet I can not find any refference to it in any of my books. I am just not getting it. I know someone is going to say do it like this, and think i am a dummy. <grin>
Thanks in advance.
If you respond please give control source info and row source
I have a Access 97 app, that I converted to 2000, then upsized to SQL 7. I have two tables. The First one Counties has fields County_ID, and CountyName. The second has demographic info in it. When I display a form with the demographic info, i want it to lookup the county name from the Counties table. I have a listbox and and want to have it populate it automatically. What I need to know is how to pass the county_ID to the sql statement that I have in the Row Source
select DISTINCTROW [Counties].[CountyName] from [Counties] where [Counties].[County_ID] = ??? Control Source ????
??? Control Source ??? is where I get stuck.
select DISTINCTROW [Counties].[CountyName] from [Counties] where [Counties].[County_ID] = !Current.County_ID!
Is there a var that I can use for control source. $CurrentRecord or something like that. This is driving me crazy. It seems so simple, yet I can not find any refference to it in any of my books. I am just not getting it. I know someone is going to say do it like this, and think i am a dummy. <grin>
Thanks in advance.
If you respond please give control source info and row source