Requery forms underlying data

G

Guest

I have a form that's data is supplied from an underlying query of a number of
tables.The form also has a number of subforms.

I have a VB procedure that runs when the user changes data in a subform. The
procedure deletes specific records from and then appends new records (in
their place) to one of the tables that is part of the underlying query for
the main form e.g. outcome of last phone call to client.

When I run the VB procedure from the subform, the data in the textboxes on
the main form that has been deleted and refilled does not update even though
I requery and refresh the main form. It appears as "#Deleted".

Does anybody know the reason for this?
 
J

jahoobob via AccessMonster.com

My SWAG, without additional info is that when you delete a record with an ID
of 1 and then append to a table of 100 records, your new record's ID is 101
and since the subform was probably linked to the main form by that ID,1, it
sees that record 1 has been deleted.
If you really want to delete the data just change the contents of the record.
 
G

Guest

Thanks for the reply

However, the table I'm appending to does not have an automatic number/ID
field. I delete the record with an ID of say 206 and then replace it with a
new record that has the ID of 206 but with the other data/fields updated.
You're probably wondering why I don't use an update query and I have tried to
but I get an error message saying 'Run-Time Error 3073' Operation must use an
updateable Query
 

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