Re: Adding a record does not populate db?

Tech-Archive recommends: Fix windows errors by optimizing your registry



John:

No front and backend. Just a very basic db. (One of my first)
I have a button on the page that runs this:


Private Sub Command15_Click()
On Error GoTo Err_Command15_Click

DoCmd.GoToRecord , , acNewRec

Exit_Command15_Click:
Exit Sub

Err_Command15_Click:
MsgBox Err.Description
Resume Exit_Command15_Click

End Sub

Would I just add the: dbEngine.Idle dbRefreshCache
after the acNewRec ?






"John Spencer" wrote:

How is your database set up?

Do you have a front-end (forms, reports, etc) and a back-end (just the data
tables)?

You can add a button to your entry form that the user's can press to
requery the source for new records. Or you can put the requery in a timer
event - little more dangerous because requery will move them off the current
record whether they are ready to move or not.

The code for the requerying a form's data source is
Forms!YourFormName.Requery
or if you are running the code from the form's module you can use
Me.Requery

I'm not sure that dbEngine.Idle dbRefreshCache will solve your problem, but
it couldn't hurt to try it and see if it solves your problem.

You could use code to requery the recordsource upon entering each record.
But that could significantly slow the operation of entering and updating
data.


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"DS" <DS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C7DF2B8A-DC2F-4C14-AF29-3D7ABE3BEB82@xxxxxxxxxxxxxxxx
So this DBEngine.Idle dbRefreshCache command should be in my Save record
command?


"Dennis" wrote:

There is a lag between database operations and their being written from
cache
to the database. Your application should have a DBEngine.Idle
dbRefreshCache
command included, which refreshes users' data with the most current. It
also
forces flushing cached database operations to the database.

"DS" wrote:

Hoping this easy as I am new to Access.

Using Access 2000 and have a basic db. Users just Add, Update and
Delete
records in a standard form.

The problem is if any user ADDs a record, that new record is not
visible to
other users unless they exit and re-enter the db.

But if someone UPDATEs an existing record, that update is visible to
all
users.

If someone DELETES a record, the record is still there for other users
but
each field is filled in with "#DELETE" until they exit and reenter.

What is not set properly where the New records are not visible to other
users?

I appreciate and input.

DS



.


Quantcast