Correction to 'Record Update Problem' post

C

CSDunn

Hello,
The following message contains corrections to a message I sent out on 8/20:

I have an Access 2000 ADP form with a 'Record Source' to a SQL Server 2000
View in which two of the fields are called 'Pending (BIT, Default 0, NULL)'
and 'Date_Assigned(SMALLDATETIME, NULL)'. The Record Source for the form is
a View that filters for 'Date_Assigned IS NULL' and 'Pending = 0'.

This means that when the form opens and shows the records, all of the
'Date_Assigned' fields are NULL, and the 'Pending' fields are unchecked. The
users need to be able to fill in the 'Date_Assigned', and check 'Pending'
from this form, and have the records update accordingly. When I try to
populate either one of these two fields with data, and then try to navigate
to the next record, I get the following message:

"The data was added to the database but the data won't be displayed in the
form because it doesn't satisfy the criteria in the underlying record
source".

When I click 'OK' for this message, the record navigator indicates that
there is one less record in the record set, and this is what I would expect.
If I try to just close the form after
attempting to populate either one of these fields without navigating to the
next record, I get the same message
above and the following message:

"You can't save the record at this time. Microsoft Access may have
encountered an error while trying to save a record. If you close this object
now, the data changes you made will be lost. Do you want to close the
database object anyway?"

The first message makes perfect sense, but the second message is not
accurate. After I populate either of these two fields, then close the form,
then reopen the form, I can see that the record I edited has dropped out of
the record source as it should.

In an Identical Access database that I have, these problems do not occur.
When I populate the fields and navigate away from the record, I can actually
go back to the record and see the change make to the fields as if the change
is pending but has not been saved to the database yet. When I populate the
fields then close the MDB form and reopen it, the record does not appear
which tells me the update to the record was saved in the table.

What I had indicated earlier about the updates to the records not occurring
was incorrect. What I basically need is simply a way to suppress these
messages so that the user does not have to deal with them. I tried a couple
of things with 'SetWarnings' but this action does not apply to messages that
require user input.

What can I do to manage these two messages so that the user never sees them?

Thanks!

CSDunn
 
G

Guy Horton

CSDunn

Again apologies in advance if I have misunderstood the intent of your
thread. Specifying a resync command should remove the:

"The data was added to the database but the data won't be displayed in the
form because it doesn't satisfy the criteria in the underlying record
source".

And allow the record to remain visible as part of the existing recordset.

Note. that as your form is based on a view your resync command should also
refer to the view and not the underlying table.

As for the second error to be honest I am still not completely convinced
that this isn't the bit field bug logged many moons ago.

Anyway hope this helps

Cheers
Guy
 
C

CSDunn

Guy,
I was able to use a very simple 'SELECT' statement in the 'Resync Command'
to the View (the Record Source), and now everything works as it should.

Thanks again!

CSDunn
 

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