Help Me Please

ChrisGow

Registered User.
Local time
Today, 06:46
Joined
May 9, 2005
Messages
35
I am trying to make a form where the user selects a part number from a combo box. After the selection has been made I want to be able to see other information about the part. I have a table that has part number and description in it as well as a couple of other fields that I want to view. How do I make it so that when the combo box is changed the information on the rest of the form changes.

I know how to make it so I can do all of this by opening another form that runs a query based on the combo box, but I would like it to stay in the same form. I thought of using a sub form to do this however it will only update if I go back into design view then into datasheet view.

Could someone please help with this, it has been stessing me out for a few hours now.

Thanks,
Chris
 
I'm not sure this will work. In the version with your subform you could try
Code:
Me.Refresh
for the combo box OnChange event. This should also update the subform.

The VBA code for this would look like this:
Code:
Private Sub ComboBoxName_Change()
Me!Refresh
End Sub

The On Change event in the properties window should be set to [Event Procedure]

Hope this works...

Greetz
Luke
 
Hey thanks for the help.
Ended up being that I had to have my code as Me.Refresh not Me!Refresh.
 

Users who are viewing this thread

Back
Top Bottom