List Box go to first record

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

Hello,

I have two list boxes based, the second based on the results of the first.
This works fine. However, I want to automatically select the first record in
the second list box after the first one has been clicked on by the user. I
just cant think how to do this. Here is what I have on the click property of
the first list box:

Me.Refresh
DoCmd.GoToControl "List2"
'DoCmd.GoToRecord , , acFirst

Cananyone help?
 
Martin said:
I have two list boxes based, the second based on the results of the first.
This works fine. However, I want to automatically select the first record in
the second list box after the first one has been clicked on by the user. I
just cant think how to do this. Here is what I have on the click property of
the first list box:

Me.Refresh
DoCmd.GoToControl "List2"
'DoCmd.GoToRecord , , acFirst


Scrap that stuff an use list1's AfterUpdate event procedure:

Me.List2.Requery
Me.List2 = Me.List2.Itemdata(0)
 
Marsh, thanks for your help.

Martin

Marshall Barton said:
Scrap that stuff an use list1's AfterUpdate event procedure:

Me.List2.Requery
Me.List2 = Me.List2.Itemdata(0)
 
Back
Top