• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

Update form when adding a new one

We have two computers working from the same table backend table.  We both are creating new records on the same form. Currently the only way we can see the other persons forms is to close our form and then re-open it. Is there a way to update so we don't have to do this? It is rather cumbersome having to close the form and then re-open it.

Thanks!

Chris
0
cansevin
Asked:
cansevin
  • 2
2 Solutions
 
Jeffrey CoachmanMIS LiasonCommented:
You can use a button to "requery" the form.
On the click event of the button, use code like his:

    Me.Requery
0
 
cansevinAuthor Commented:
Thanks Jeff... that is what I'll use.

I'm worried it isn't the "on click" event.

It is when we go to create a new memo. Is there a better place for that Me.Requery?
0
 
Jeffrey CoachmanMIS LiasonCommented:
You can requery at any time you want.
You can also requery any control/field you like.
(So along thoes lines, if you only want torequery the memo filed, ...you can do this:
    Me.YourMemoField.Requery

The kicker is that the "other new" record must have been committed to the table.

So you can do it on the GotFocus or Enter event of your memo control, ...but this may be problematic...

Better to add a "Create new memo button", ...to control this better.

But we are getting ahead of ourselves.
Please describe your form and its purpose, ...
Then describe the exact (step by step) user scenario... (and what you want to see or happen)

JeffCoachman
0
 
PatHartmanCommented:
When you open a form, Access creates a recordset based on the table or query specified in the form's RecordSource.  Behind the scenes, Access will update the recordset if columns change and if rows are deleted they get marked as #deleted# in every column but NEW rows are not shown.  the only way to see new rows is to re run the RecordSource query and you can force that with:

Me.Requery

How critical is it that you be instantly aware of what the other person is doing?  I would use a button to force the requery rather than including it as a byproduct of some other event.  At least that way, you can control when it happens and do it as frequently as necessary but not so frequently that it is disruptive.

Keep in mind that if you are looking at a continuous or datasheet view form, when you requery the recordsource, the record pointer will move back to the first record which might be disconcerting.  If you don't want to reposition the recordset, you would need to save the PK of the current record and then after the requery, reposition the form to that record.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now