J
JeffG
Hello all-
If have a form that filters a recordset based on two drop down boxes.
Here's the problem...The first drop down box is Country. The second is
Year. When I select the Country, it selects the Country. When I select any
other Year in the Year dropdown box, it goes back to the first item in the
Country set with the first year. What I thought I could do is use multiple
criteria in the rs.findfirst, but I am going nuts trying to figure it out.
Here's the sub in its entiretly...
Private Sub Year_Lookup_AfterUpdate()
Set rs = Me.Recordset.Clone
rs.FindFirst "[Country] = '" & Me![Country_Lookup] & "'"
rs.FindFirst "[Year] = " & Me![Year_Lookup]
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
What I want to do is to be able to filter the recordset down to the Country
and if the Country has multiple years in the table, select the country and
the year to input the data. For example, in my table, there is Argentina,
year 2005, Bahamas, year 2005, Japan, years 2005 and 2006. I want to be
able to select Japan, year 2006 so that I can enter the data.
Any help would be greatly appreciated.
JG
If have a form that filters a recordset based on two drop down boxes.
Here's the problem...The first drop down box is Country. The second is
Year. When I select the Country, it selects the Country. When I select any
other Year in the Year dropdown box, it goes back to the first item in the
Country set with the first year. What I thought I could do is use multiple
criteria in the rs.findfirst, but I am going nuts trying to figure it out.
Here's the sub in its entiretly...
Private Sub Year_Lookup_AfterUpdate()
Set rs = Me.Recordset.Clone
rs.FindFirst "[Country] = '" & Me![Country_Lookup] & "'"
rs.FindFirst "[Year] = " & Me![Year_Lookup]
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
What I want to do is to be able to filter the recordset down to the Country
and if the Country has multiple years in the table, select the country and
the year to input the data. For example, in my table, there is Argentina,
year 2005, Bahamas, year 2005, Japan, years 2005 and 2006. I want to be
able to select Japan, year 2006 so that I can enter the data.
Any help would be greatly appreciated.
JG