Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Main form doesn't update after Combobox value selected

Status
Not open for further replies.

moremind

Programmer
Mar 2, 2005
6
US

Hi. I have an order no on the main form in a combo box with the values displayed from a table. When the user selects a value the subform updates beautifully but the main form doesn't. I've tried to use refresh and requery but it says it's invalid syntax. Anyone have ideas?

Thx
Elle
 
How are ya moremind . . . . .
moremind said:
[blue]When the user selects a value the subform updates beautifully [purple]but the main form doesn't.[/purple][/blue]
[purple]Be more specific about what you expect here![/purple]

Calvin.gif
See Ya! . . . . . .
 
Hi.

What are you expecting to 'update' on the main form?
Is there code in any combo box event? If so, what is it?
Is your combobox BOUND? Meaning, is there a Control Source?
What is the Record Source of your main form?

When you say the subform 'updates', do you mean that the records displayed in the subform change depending on what is selected in the combo box? Or that some data in the subform is actually altered or added in some way?

Thanks.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Now that I read your responses I see how vague my was. I have a Main form combobox of OrderNos that has:
Record Source Type = Table/Query
Record Source = MainTable
ControlSource = Ordno

When an orderno is entered or selected in the combobox, the subform displays the detail records for the ordno selected (there is a link master/child relationship setup). The Main form -- which has customer name, address, etc. info -- does not change and I want it to ... ie. want it to display the new header info matching the just selected ordno. I don't know how to do that.

I tried to add a code snippet on the combobox ordno_after_update:
Form.RecordsetClone.FindFirst _
"[ordno]='" & [ordno].Value & "'"
Form.Bookmark = Form.RecordsetClone.Bookmark

But this produces an error.

Hope that explains it better. Would really appreciate any help that you can give me? Thank you.

 
And this ?
Me.RecordsetClone.FindFirst _
"[ordno]='" & [ordno].Value & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top