By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,635 Members | 911 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,635 IT Pros & Developers. It's quick & easy.

Problem with Deleted Records

P: n/a
Bob
I have a form, and a subform based on a query. I want to delete
specific records from my table based on certain conditions. I mean,
when the user adds a new record to the subform, the form saves the
record on the table, now if, for example, user decides to change the
JobNumber, there is a query that runs to delete the old jobnumber and
related data from the table. But the problem is, when It deletes the
records, "Deleted" appears in all the fields in the form and user will
not be able to do anything. I tried to requery the subform, but it
dosn't work. How can I have this form clean and ready to input data
after the old data has been deleted?
Thank you
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Requery sounds like the right approach.

Did you requery form in the subform control, i.e.:
Me.[NameOfYourSubformControlHere].Form.Requery

Did you get an error message? Does your subform control have a different
name name than its SourceObject?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Bob" <ba******@gmail.com> wrote in message
news:b6**************************@posting.google.c om...
I have a form, and a subform based on a query. I want to delete
specific records from my table based on certain conditions. I mean,
when the user adds a new record to the subform, the form saves the
record on the table, now if, for example, user decides to change the
JobNumber, there is a query that runs to delete the old jobnumber and
related data from the table. But the problem is, when It deletes the
records, "Deleted" appears in all the fields in the form and user will
not be able to do anything. I tried to requery the subform, but it
dosn't work. How can I have this form clean and ready to input data
after the old data has been deleted?
Thank you

Nov 13 '05 #2

P: n/a
Bob
I tried to requery the form in both the form and the subform, none of
them worked. Also my subform does not have different name. everytime I
tried to do the requery, I got error. then I used some error handlings
in where I was requering the form,( On error goto etc..) and it
worked!!

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message news:<41***********************@per-qv1-newsreader-01.iinet.net.au>...
Requery sounds like the right approach.

Did you requery form in the subform control, i.e.:
Me.[NameOfYourSubformControlHere].Form.Requery

Did you get an error message? Does your subform control have a different
name name than its SourceObject?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Bob" <ba******@gmail.com> wrote in message
news:b6**************************@posting.google.c om...
I have a form, and a subform based on a query. I want to delete
specific records from my table based on certain conditions. I mean,
when the user adds a new record to the subform, the form saves the
record on the table, now if, for example, user decides to change the
JobNumber, there is a query that runs to delete the old jobnumber and
related data from the table. But the problem is, when It deletes the
records, "Deleted" appears in all the fields in the form and user will
not be able to do anything. I tried to requery the subform, but it
dosn't work. How can I have this form clean and ready to input data
after the old data has been deleted?
Thank you

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.