Move to Last and refresh

B

Brian

Here are the basics. I have a form that has two subforms
in it sub1 and sub2. Both subforms read off of the same
table, just present more/less information differently. I
have set up new data entry based on clicking on a button
to run the following code:

Private Sub CmdNewEntry_Click()
stDocName = "Q_NewEntry"
DoCmd.OpenQuery stDocName, acNormal, acEdit


I am looking for the next line of code to add after the
above that will refresh both subforms with the new data
that was just added to the table. I think it should be
releatively simple, just cannot come up with the necessary
command. The only thing that got me this far was peer
advice and an access manual.

Any and all help would be greatly appreciated.

Brian
 
A

Andy

Brian,

You might try sub1.requery and sub2.requery.

I would consider making the subforms children of the main form and setting
up parent-child links. This way, when information changes on the parent
form, the subforms are automatically updated by Access.


hth,
Andy
 
B

Brian

I did not state correctly what I was looking for. I am
actually looking to make both forms move to the "last"
recordset (the one just entered) and show it.
 
B

Brian

Did not work. Revieved the error message "Object
Required". I entered it as suggested.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top