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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform not reflecting added record data

Status
Not open for further replies.

TeriCoombes

Technical User
Aug 26, 2004
22
US
I have a form where I choose a name from a combobox. On the AfterUpdate() I have:
Dim rs as Object
Set rs=Me.Recordset.Clone
rs.FindFirst "[Name]=""" & Me![cboName]&""""
If Not rs.EOF then Me.Bookmark=rs.Bookmark

This works great until I have to add a new record. Once I add a new record, I have to set the OnFocus event on the combobox:

cboName.Requery

Which works great to repopulate the combobox list, but when I choose the added record name, the subform data does not reflect the added data.

Does this make any sense to anyone? Please help.
 
You would need to Requery the subform in order for it to display new records.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Your code doesn't suggest a requery of the subform. You really should tell us what you tried so that we don't waste our time making suggestions that you have tired.

Maybe you should show us all your code.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
try
form_subformname.requiry
after the update should work.

Ian Mayor

Program Error
Why is it, I still think in terms of spectrum BASIC!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top