Hello,
I am using MS Access 2000.
I have a Main Form with a Listbox and a Subform. The Subform has various fields that correspond to a value selected from the Listbox.
To make this more understandable, lets assume that I have a Table with Client names and the State where they reside and various other information.
The Listbox is based on a Query that list only the Clients residing in a particular State.
On_Open of the Main Form the Listbox is automatically populated with the filtered clients from the Query. When I Click on one of the Clients listed in the Listbox, the information displayed on the Subform is automatically populated/updated with additional data associated with that particular Client. This is based on the AfterUpdate event in the Listbox
O.K., now here's the question.
When I open the Main Form, the Listbox is automatically populated with the filtered data from the Query. However, the Subform indicates data based on the first record in the associated Table.
What I would like is for the Subform to automatically read or be equal to the first record listed in the Listbox not the first record in the Table when the Main Form is opened. By doing so, I can be assured that the data listed in the Subform when the Main Form is opened is relevant to what I set the Query for.
Basically, when the Main Form is opened I would like the Textbox that is located on the Subform to indicate the same Client Name that is listed on the first row of the Listbox.
Any help would be appreciated...
I am using MS Access 2000.
I have a Main Form with a Listbox and a Subform. The Subform has various fields that correspond to a value selected from the Listbox.
To make this more understandable, lets assume that I have a Table with Client names and the State where they reside and various other information.
The Listbox is based on a Query that list only the Clients residing in a particular State.
On_Open of the Main Form the Listbox is automatically populated with the filtered clients from the Query. When I Click on one of the Clients listed in the Listbox, the information displayed on the Subform is automatically populated/updated with additional data associated with that particular Client. This is based on the AfterUpdate event in the Listbox
O.K., now here's the question.
When I open the Main Form, the Listbox is automatically populated with the filtered data from the Query. However, the Subform indicates data based on the first record in the associated Table.
What I would like is for the Subform to automatically read or be equal to the first record listed in the Listbox not the first record in the Table when the Main Form is opened. By doing so, I can be assured that the data listed in the Subform when the Main Form is opened is relevant to what I set the Query for.
Basically, when the Main Form is opened I would like the Textbox that is located on the Subform to indicate the same Client Name that is listed on the first row of the Listbox.
Any help would be appreciated...