Record Update Problem

C

CSDunn

Hello,
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 added data goes away (despite the
message, the data is not added to the database), and the navigation action
stays at the current record. If I try to just close the form after
attempting to populate either one of these fields, 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 what I need is for the user to
able to populate one or the other or both of these fields, and when they
navigate to the next record, have the change saved, not have the messages
show up, and have the record eliminated from the form per the criteria of
the View. I also need for the update to the record to be saved when the user
closes the form.

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.

I have tried to use a Macro with the 'Refresh' action associated with
different events on the form and the fields, but nothing has worked.

What do I need to do to get these records updated correctly when the user
populates either of the two fields?

Thanks!

CSDunn
 
G

Guy Horton

CSDunn,

Apologies in advance if I have misunderstood the thread of your message.

This sounds like the... first field on the form bit field bug.

I worked around it by set the forms recordsource programatically in the
Form_Open event. I believe others modified the checkbox field on the form to
another type of control.

Hope this helps
Guy
 
C

CSDunn

Guy,

Thanks for your response. The problem does not seem to be with the 'Pending'
Bit field and 'Date_Assigned' fields themselves, but with the fact that if
these fields are filled in, the record no longer meets the criteria of the
record source.

I tried the two things you suggested here, but neither worked. I am going to
try a couple of other things, but if you have another suggestion, I would
sure appreciate it.

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