Value with Record change

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have cbo_I and cbo_2 on the same form. cbo_1 is fed off of a table.
cbo_2 is fed off of a query that has cbo_1 set as the filter criteria. So
the options in cbo_2 will change depending on the value selected in cbo_1.
My problem is that if the cbo_1 value already exists, it is not filtering.
It only filters if I make a current selection.

The criteria in my query is [Forms]![frm_A]![cbo_1]

I believe I need a way to execute a requery when I click the navigation
buttons or change the current record. Is there a way to do this?

Thanks
 
Karen,
There's several ways... you may get multiple suggestions.

Try using the OnCurrent event of the form
If Not IsNull(cbo_1) Then
cbo_2.Requery
End If

If cbo_1 is empty you don't have to requery since you'll have to enter a
value in cbo_1 anyway. You would then use the AfterUpdate of cbo_1 could
trigger that requery.

hth
Al Camp
 
Thanks!

Al Camp said:
Karen,
There's several ways... you may get multiple suggestions.

Try using the OnCurrent event of the form
If Not IsNull(cbo_1) Then
cbo_2.Requery
End If

If cbo_1 is empty you don't have to requery since you'll have to enter a
value in cbo_1 anyway. You would then use the AfterUpdate of cbo_1 could
trigger that requery.

hth
Al Camp

Karen53 said:
Hi,

I have cbo_I and cbo_2 on the same form. cbo_1 is fed off of a table.
cbo_2 is fed off of a query that has cbo_1 set as the filter criteria. So
the options in cbo_2 will change depending on the value selected in cbo_1.
My problem is that if the cbo_1 value already exists, it is not filtering.
It only filters if I make a current selection.

The criteria in my query is [Forms]![frm_A]![cbo_1]

I believe I need a way to execute a requery when I click the navigation
buttons or change the current record. Is there a way to do this?

Thanks
 
Back
Top